added the redirect to login page instead of home