support basic auth for password protected pages. a little refactoring