<commit_before># This controller handles the login/logout function of the site.  
class SessionsController < ApplicationController

  force_ssl :only => :new
  no_login_required :except => :destroy
  
  skip_before_filter :confirmed_user?
  skip_before_filter :load_project
  before_filter :set_page_title

  def new
    # Cleanup OAuth login parameters if present
    session.delete :profile
    session.delete :app_link
    @signups_enabled = signups_enabled?
    respond_to do |format|
      format.html { redirect_to root_path if logged_in? }
      format.m
    end
  end

  def create
    @signups_enabled = signups_enabled?
    logout_keeping_session!
    
    user = User.authenticate(params[:login], params[:password])
    if user<commit_msg>More permissive login method, to support log in from external sites<commit_after># This controller handles the login/logout function of the site.  
class SessionsController < ApplicationController

  force_ssl :only => :new
  no_login_required :except => :destroy
  
  skip_before_filter :confirmed_user?
  skip_before_filter :load_project
  skip_before_filter :verify_authenticity_token, :only => :create
  before_filter :set_page_title

  def new
    # Cleanup OAuth login parameters if present
    session.delete :profile
    session.delete :app_link
    @signups_enabled = signups_enabled?
    respond_to do |format|
      format.html { redirect_to root_path if logged_in? }
      format.m
    end
  end

  def create
    @signups_enabled = signups_enabled?
    logout_keeping_session!
    
    user = User.authenticate(params[:login], params[:password])
    if user
{'fraction_non_alphanumeric': 0.06481481481481481, 'fraction_numerical': 0.0, 'mean_word_length': 3.912121212121212, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '4026293', 'n_tokens_mistral': 485, 'n_tokens_neox': 470, 'n_words': 133}