Login and register in separated classes