Model. User registers and logs in