Implemented backend login and register api calls