Fixed minor bugs in the API. Need to add EMAIL backend