You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sessions_controller.rb
    path of file: ./repos/daily-log/rails/app/controllers
    
    the code of the file until where you have to start completion: class SessionsController < ApplicationController
  skip_before_action :au
    
  def create
    if (user = User.authenticate_by(authentication_params))
      sign_in user
      redirect_to days_path, notice: "You are now signed in."
    else
      flash.now.alert = "Invalid email or password."
      render :new, status: :unprocessable_entity
    end