Bug fixes - Authentication