log in and registration working as required