Added field to error details so it can be thrown from server method.
Validating username on server.
Renaming and commenting.