functioning login and log out with serverstub