Fixed authentication and getting around the strtolower