Fix login and register for saas