Added login and logout capability
Cleaned up login/logout system