[WIP] Make new authentication request more flexible and with Ajax request support

- [ ] Add specs
Good call, might be best.