added code to handle a failed api call
implemented $q.all to get all session ids
we can now get all epoch ids from selected/checked sessions using promises
now gets a unique list of epoch ids for all selected epochs and sessions