"global" commands added to logIn() and logOut() to fix code bug.