Added authentication factory and sign in function prototype.