If user returns True if the user is not None. So shouldn't this if statement pass if the user is logged in?