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: user_session.rb
    path of file: ./repos/alonetone/app/models
    
    the code of the file until where you have to start completion: class UserSession < Authlogic::Session::Base
  record_selection_method :find_by_login_or_email

  # override authlogic's version of this to take into account @sudo
  def update_info
    unless controller.session[:sudo]
      record.last_login_at = record.current_login_at
      record.current_login_at = ActiveR
    
  def update_info
    unless controller.session[:sudo]
      record.last_login_at = record.current_login_at
      record.current_login_at = ActiveRecord.default_timezone == :utc ? Time.now.utc : Time.now
      record.last_login_ip = record.current_login_ip
      record.current_login_ip = controller.request.ip

      # update_info can be called before user and its associated profile is created
      record.profile&.update_attribute :user_agent, controller.request.user_agent
    end