Fix null roles problem, fix redirect problem