Added the connect() function to LoginCtrl