better handling of the user string

* allocate a copy in the right context
* check for the beacon "user"
* change the test to use a String* instead of char*