Added ajax support for login