diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb
index 78bad6b31..b5019ed87 100644
--- a/app/views/devise/sessions/new.html.erb
+++ b/app/views/devise/sessions/new.html.erb
@@ -16,6 +16,14 @@
Sign in
Don’t have an account? <%= link_to "Sign up", new_user_registration_path, class: 'small fw-bold' %>
+
+
+ <% if flash[:alert] %>
+
+ <%= alert %>
+
+ <% end%>
+
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<%= f.label :email %>
<%= f.email_field :email, autofocus: true, autocomplete: "email", class: 'form-control' %>
diff --git a/app/views/layouts/devise.html.erb b/app/views/layouts/devise.html.erb
index b1990513b..d8b0b162b 100644
--- a/app/views/layouts/devise.html.erb
+++ b/app/views/layouts/devise.html.erb
@@ -5,21 +5,7 @@
- <% if flash[:notice] %>
-
- <%= notice %>
-
- <% end %>
-
- <% if flash[:alert] %>
-
- <%= alert %>
-
- <% end%>
-
-
- <%= yield %>
-
+ <%= yield %>
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 5f14050f2..69c9dc95a 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -311,4 +311,7 @@
# added to prevent turbo conflict
config.navigational_formats = ["*/*", :html, :turbo_stream]
+
+ config.responder.error_status = :unprocessable_entity
+ config.responder.redirect_status = :see_other
end