seperated sync and login logic

Now the login command only sets the sync key and the sync command has
options that specify whether to get or set data to and from the cloud.
Should be more intuitive.
fix tab completion edge case

if 2 commands existed with the same name the current command was
replaced with an empty string eg. alias and aliases