Add web user component and refactor code