Refactored login and sync everything works now