Handling access denied pages?

hello
i have some restricted sections on my website and have been thinking how to handle them, essentially i have 2 choices, but i don’t know which is better for the user and the search engines:
is it better to turn the restricted page into a access denied page or to redirect the user to a access denied page?

the difference between the 2 is that in one case the user is not redirected anywhere and just sees different content on the same page, while on the other case the user is redirected to a different page that has the sole purpose of being a access denied page.

im just wondering which is better for the user, his browser and the search engines?

p.s. both cases will have a “401 Access denied” header.

For security purposes, both. For SEO purposes, redirection.

what HTTP header should the denied page serve while redirecting and what HTTP header should the login page have?

Why redirect? Just serve a login page with a 401 header.

Can’t be a 401 header
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource

in my case there is no WWW-Authenticate Header as the authentication is done using PHP (similar to sitepoint for example) instead of HTTP.

so do you suggest i directly serve the page as a login page with a 403 header?

thanks for your suggestion.

edit:
what about average login pages that users might want to visit to login?

Ah yes, I meant to serve the login page as 403.