<commit_before>class UsersController < ApplicationController
  include UserHelper

  def index
    # check_sign_in #commented these out because of redirect loop
    redirect_to user_categories_path(@user)
  end

  def sign_in_page
  	render :sign_in
  end

  def sign_up_page
  	render :sign_up
  end

  def login
  	@email = params[:user][:email]
    @user = User.authenticate(@email, params[:user][:password])
    if @user
      session[:user_id] = @user.id
      redirect_to user_categories_path(@user), flash: {notice: "Successful log in!"}
    else
      redirect_to users_login_path, flash: {notice: 'Invalid credentials!' }
    end<commit_msg>commit before upstream<commit_after>class UsersController < ApplicationController
  include UserHelper

  def index
    # check_sign_in #commented these out because of redirect loop
    #redirect_to user_categories_path(@user)
  end

  def sign_in_page
  	render :sign_in
  end

  def sign_up_page
  	render :sign_up
  end

  def login
  	@email = params[:user][:email]
    @user = User.authenticate(@email, params[:user][:password])
    if @user
      session[:user_id] = @user.id
      redirect_to user_categories_path(@user), flash: {notice: "Successful log in!"}
    else
      redirect_to users_login_path, flash: {notice: 'Invalid credentials!' }
    end
{'fraction_non_alphanumeric': 0.08931297709923663, 'fraction_numerical': 0.0, 'mean_word_length': 3.9101123595505616, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6951859', 'n_tokens_mistral': 415, 'n_tokens_neox': 403, 'n_words': 109}