[SERVER] Add debug code and registerUser function.