updated authFactory