diff --git a/Oqtane.Client/Modules/Admin/Login/Index.razor b/Oqtane.Client/Modules/Admin/Login/Index.razor
index eec57ca8..8ce6ea86 100644
--- a/Oqtane.Client/Modules/Admin/Login/Index.razor
+++ b/Oqtane.Client/Modules/Admin/Login/Index.razor
@@ -12,6 +12,9 @@
...
+
+
+
@if (!twofactor)
{
@@ -166,12 +169,14 @@
{
if (firstRender && PageState.User == null && _allowsitelogin)
{
- if(!string.IsNullOrEmpty(username.Id))
+ if (!string.IsNullOrEmpty(username.Id)) // ensure username is visible in UI
+ {
await username.FocusAsync();
+ }
}
// redirect logged in user to specified page
- if (PageState.User != null)
+ if (PageState.User != null && !UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin))
{
NavigationManager.NavigateTo(PageState.ReturnUrl);
}