User Login Page not available to logged in user

Issue: In a Drupal site a logged in user gets a 403 page (access denied) if they browse to the user/login page. Well? (I hear you ask) Why do you want to see the login page if you are logged in?? Good question - but it is not really an error or an access denial issue is it - it is more a 'user path/flow' issue. A good solution would be to see the user's own profile page.

One solution is to sniff cookies in the htaccess (see Source: http://drupal.org/node/118498#comment-2133406 -

Note I have altered the snippet (from mikeytown2) from the Drupal site to direct access to the user's profile page not the root and to use the session cookie not the Boost one - see below)

#Fix logged in user access to login page
RewriteCond %{HTTP_COOKIE} [SESS]*
RewriteCond %{REQUEST_URI} ^/user/login [OR]
RewriteCond %{REQUEST_URI} ^/user/register
RewriteRule ^user/.* /user [L,R=307]

The cookie starting 'SESS' is not really unique enough and in theory will prevent anyone accessing the /user/login page - but it does work, doesn't affect anonymous users and not a problem if you have a login block - also the above solution doesn't prevent accessing the password reminder.

The boost module sets a specific cookie DRUPAL_UID which if installed would be ideal to use in the above snippet! (as per the original)

RewriteCond %{HTTP_COOKIE} DRUPAL_UID
RewriteCond %{REQUEST_URI} ^/user/login [OR]
RewriteCond %{REQUEST_URI} ^/user/register
RewriteRule ^user/.* /user [L,R=307]