Added login/logout features.