login method and User object mapping