server side javascript micro component for auth