we should check if a user is logged in before we check for admin privil...

...ege

fixed #5271 in master