The RegistrationRequest() returns an error if the username is taken but not if the displayname is taken. Any way to know that?
PD: will be nice if you can implement that ^^
Our displayNames aren't required to be unique so to implement this yourself would be quite a bit of work. It could be done though. The easiest way to achieve this is to set the displayName to be the same as the userName on registration. If the userName is taken you'll get the userName taken error and the registration won't be completed. If you have any further questions just let me know.
There is a method to log out the players? I can't find it on the API documentation =S
You can log a player out completely by using Spark.getPlayer().disconnect(); the link to the documentation is here https://docs.gamesparks.com/api-documentation/cloud-code-api/player/sparkplayer.html#disconnect
Hope this helps,