can now log user out properly