Fix authentication not storing sessions