Java script app for login and chat