diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
new file mode 100644
index 0000000..0fb2d97
--- /dev/null
+++ b/app/controllers/registrations_controller.rb
@@ -0,0 +1,17 @@
+class RegistrationsController < Devise::RegistrationsController
+
+ before_action :one_user_registered?, only: [:new, :create]
+
+ protected
+
+ def one_user_registered?
+ if User.count == 1
+ if user_signed_in?
+ redirect_to root_path
+ else
+ redirect_to new_user_session_path
+ end
+ end
+ end
+
+end
diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb
index 6109177..fcae998 100644
--- a/app/views/devise/shared/_links.html.erb
+++ b/app/views/devise/shared/_links.html.erb
@@ -23,3 +23,5 @@
<%= button_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), data: { turbo: false } %>
<% end %>
<% end %>
+
+
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 71c065d..3a6ee32 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -31,7 +31,6 @@