better handling on login/logout when /apps folder is not accessible as anonymous