refactor User::find_by_credentials