Strange security.getUserName() Problem

Hello,
I have a web only solution and have mustAuthenticate ticked… I can login successfully with a valid username and password. but security.getUserName() and security.getUserUID() both return null. What have a missed?.

viewtopic.php?f=34&t=18112