Added ajax support for logging in

Added login controller
Added login.js for client-side login
Modified hdi.js