<commit_before>get '/sessions/new' do
  erb :login
end

post '/sessions' do

end

delete '/sessions/:id' do

end
<commit_msg>add sessions controller<commit_after>get '/sessions/new' do
  erb :login
end

post '/sessions' do
  @user = User.where(username: params[:username]).first

  if @user && (@user.password == params[:password])
    session[:user_id] = @user.id
    status 200
    redirect '/'
  else
    status 400
    redirect '/sessions/new'
  end
end

delete '/sessions/:id' do
  session.delete(:user_id)
  redirect '/'
end

{'fraction_non_alphanumeric': 0.1393596986817326, 'fraction_numerical': 0.011299435028248588, 'mean_word_length': 3.4705882352941178, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6583082', 'n_tokens_mistral': 193, 'n_tokens_neox': 187, 'n_words': 50}