adding User object and improving authenticationController