Fix authentication bug in a user session.