Logging/registering/logging out working