Added login/logout feature.