trying to implement the core authentication