Small bugfix as well for the logout function