Refactor user sign in/up and controller test