Added login and logout