A better callback approach for "login" and "create subdomain"

Hey, I added a little if else for a better handling on errors, I hope it helps