Fix nil when using session auth