Set up login and master pages for AJAX