further work on registration and login API and front-end