fix login and logout after session exist