security check for navbar