fixing register and login work flows