fixing routing issue when viewing admin dashboard when not logged in