Authentication & slight restructuring