Adding to main hook to handle case of anonymous users.