refactor moved js to app.js, use some jquery, access user_repo in websocket logic