Added server side authentication

Updates to client code to handle authentication messages from server