Added autorefresh, and security features