Added basic functionality for register/login/sending messages