moved ensureAuthenticated to it's own module