Added check for anonymous user. Closes #28