failed login attempts now returns 401 status code
api now handles cross origin requests
also modified the forms to accept/expect data posted to be via application/json requests, data is now handled accordingly