def create
      @user = User.new(user_params)

      if @user.save
        log_in @user

        if (main_app.admin_dashboard_path)
          redirect_to main_app.admin_dashboard_path, notice: 'User was successfully created.'
        else
          redirect_to @user, notice: 'User was successfully created.'
        end

      else
        if current_user.nil?
          render :signup
        else
          render :new
        end
      end
    end
def create
      @user = User.new(user_params)

      if @user.save
        log_in @user

        if (main_app.admin_dashboard_path)
          redirect_to main_app.admin_dashboard_path, notice: 'User was successfully created.'
        else
          redirect_to @user, notice: 'User was successfully created.'
        end

      else
        if current_user.nil?
          render :signup
        else
          render :new
        end
      end
    end
POST /users