Register user and log in works