Fixed non login issue and added redirection to login