Add option if name not exists.
Receive login data from client.
Implement register handler which check if everything is valid and save data to mongo database.