Properly encode usernames and room titles