Added better support for authenticated users.