Login and OAuth handler.