Avoid access denied page after user logout
What you want is something called 403 redirect to Login:
https://drupal.org/project/r4032login

403 access denied messages will get redirected to the login page. I've used this before and it works nicely.