class Lato::AuthenticationController

def signup_action

def signup_action
  @user = Lato::User.new(registration_params)
  respond_to do |format|
    if @user.signup(ip_address: request.remote_ip, user_agent: request.user_agent)
      session_create(@user.id)
      format.html { redirect_to lato.root_path }
      format.json { render json: @user }
    else
      format.html { render :signup, status: :unprocessable_entity }
      format.json { render json: @user.errors, status: :unprocessable_entity }
    end
  end
end