changed login to use secure URL for authentication