Fixed wrong routing for user profile pages when the username contains dots (.). Closes #348