adds some login/logout logic to User