Took an axe to the code.
Started handling authentication in a sane manner in prep for Firebase.
Most of the old commented out code can be removed pending Takeshi.