Implement Register and login web service.