Register and login functionality completed