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: dashboard_controller.rb
    path of file: ./repos/hitobito/app/controllers
    
    the code of the file until where you have to start completion: # encoding: utf-8

#  Copyright (c) 2012-2014, Jungwacht Blauring Schweiz. This file is part o
    
  def index
    authenticate_person! unless html_request?

    flash.keep
    if current_user
      redirect_to person_home_path(current_user, format: request.format.to_sym)
    else
      redirect_to new_person_session_path
    end