<commit_before># This controller handles the login/logout function of the site.  
class Admin::SessionController < Admin::AdminController
  
  skip_before_filter :login_required
  
  layout 'simple'
  
  # render new.rhtml
  def new
  end

  def create
    self.current_user = User.authenticate_for(@site, params[:login], params[:password])
    if logged_in?
      if params[:remember_me] == "1"
        self.current_user.remember_me
        cookies[:auth_token] = { :value => self.current_user.remember_token , :expires => self.current_user.remember_token_expires_at }
      end
      redirect_back_or_default(admin_dashboard_path)
      flash[:notice] = "Logged in successfully"
    else
      render :action => 'new'
    end
  end

  def destroy
    self.current_user.forget_me if logged_in?
    cookies.delete :auth_token
    reset_session
    flash[:notice] = "You have been logged out."
    redirect_back_or_default('/')
  end<commit_msg>Get rid of unnecessary flash notice.<commit_after># This controller handles the login/logout function of the site.  
class Admin::SessionController < Admin::AdminController
  
  skip_before_filter :login_required
  
  layout 'simple'
  
  # render new.rhtml
  def new
  end

  def create
    self.current_user = User.authenticate_for(@site, params[:login], params[:password])
    if logged_in?
      if params[:remember_me] == "1"
        self.current_user.remember_me
        cookies[:auth_token] = { :value => self.current_user.remember_token , :expires => self.current_user.remember_token_expires_at }
      end
      redirect_back_or_default(admin_dashboard_path)
    else
      render :action => 'new'
    end
  end

  def destroy
    self.current_user.forget_me if logged_in?
    cookies.delete :auth_token
    reset_session
    flash[:notice] = "You have been logged out."
    redirect_back_or_default('/')
  end
{'fraction_non_alphanumeric': 0.09071390230810521, 'fraction_numerical': 0.0010735373054213634, 'mean_word_length': 3.5242718446601944, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5552765', 'n_tokens_mistral': 581, 'n_tokens_neox': 572, 'n_words': 134}