not allowing anonymous users to have a proflie page
adding helper function