Authentication bugfix