add loading mask and refactor user controller