fix boolean scaffolding bug, implement return url after login