refactored login controller/model class, register class added