Fixed issue with redirecting to login screen

When the user attempted to navigate to a nonexistent admin page, the app
threw an exception rather than redirecting.