Refine Register and login