user login function being called pre-status for some reason