add user component and clean up code