Change Login module to OOP approach