Refactored the logic of authentication
Updated the CHANGELOG