Added initial support for user login/logout.