Added login and logout capability.