Fix login response, add simple logout function (buggy)