Implemented logout on server and client.