fixed display of home screen when not logged in and proper redirection after login