Fixing the redirect to login screen for unauthenticated session.