Register and login oop way