Former mayoral candidate sentenced to two years in prison in mortgage fraud case