def show
    @user = current_user || User.new
    if @user.new_record?
      welcome
      unless performed?
        respond_to do |format|
          format.html { render action: :welcome }
          format.json { render json: {} }
        end
      end
    else
      home
      unless performed?
        respond_to do |format|
          format.html { render action: :home }
          format.json do
            user_data = @user.as_json
            user_data = user_data['user'] if @user.class.include_root_in_json
            render json: { user: user_data, csrf: form_authenticity_token }
          end
        end
      end
    end
  end
def show
    @user = current_user || User.new
    if @user.new_record?
      welcome
      unless performed?
        respond_to do |format|
          format.html { render action: :welcome }
          format.json { render json: {} }
        end
      end
    else
      home
      unless performed?
        respond_to do |format|
          format.html { render action: :home }
          format.json do
            user_data = @user.as_json
            user_data = user_data['user'] if @user.class.include_root_in_json
            render json: { user: user_data, csrf: form_authenticity_token }
          end
        end
      end
    end
  end
GET /session