Fix logic that redirects or shows an error message based on device on the admin page