refactor javascript
add default user view