Adds a viewController and sets it as the rootViewController of the window