Fixed connection state banner

It now works correctly and prevents the user from submitting if offline.