Added check for authenticated status before accessing the context via dot notation.