def create
      user = Lines::User.find_by(email: params[:email])
      if user && user.authenticate(params[:password])
        session[:user_id] = user.id
        redirect_to admin_root_url
      else
        flash.now[:error] = t('lines.login_error')
        render "new"
      end
    end
def create
      user = Lines::User.find_by(email: params[:email])
      if user && user.authenticate(params[:password])
        session[:user_id] = user.id
        redirect_to admin_root_url
      else
        flash.now[:error] = t('lines.login_error')
        render "new"
      end
    end
Authenticate user and create a new session.