Now works to register and log in