Minor fixes with authentication