added login control to admin pages