finish login phase. add auto-login after user register.