added redirect to login screen if user is not logged in.