OS: Ubuntu 12.04 and/or above

My system connected to University campus Internet which has no proxy. But needs authentication (username and password) for every 1 hour. If the web-browser is running with authentication, then no problem for updating/installing packages. But if the web-browser is off or timed out for authentication, then Update/installation can't be done.

How do I set it right?

Here is a screenshot of the authentication:![screenshot](https://i.stack.imgur.com/7V0QE.png)