login test partial rewrite