updated link to working example, fixed redirect loop for login