Reverse all bitwise operators as they are the wrong way around
RWrong operators used. Corrected.
Client does not need to send the value of domain to the server.