wrap everything in container and refactor login