Created the server, added registerUser and loginUser events handlers