Fixed Some Issues with Identity Framework