Fixed problem that arrises when not logged in