Now it registers and logs in