added user login and logout