latest version (finished get control and login function)