Minor fixes related to api session auth