Added support for AJAX GET requests to log in and sign up

When a request comes in for the login or signup views, we will detect an AJAX
request and serve a different template.