[webui][api] Fix, refactor and test user sign up