Added a simple login/logout mechanism.