refactored admin login, created 'become admin' ability if you are logged in

and refactored template code a little bit.