Improve connect/login methods