Add login tests
Clean, refactor add logout support