updated login system to be Object Oriented