Fixed issue with redirecting when logging in and logging out.