User redirected to homepage when trying to get login page