added support for reading messages back from server for Login and Register