Fixed Login and logout