Check if user has logged in, and do different permission checks

Reported by Calle