this line could also be `if @user.try(:authenticate, login_params[:password])`