refactor sign in make it independant