introduced new hook to allow modifications in login flow