Move the login login inside the 'running in Cordova conditional block'