fixed multiple login/logout issue