Solving permissions and redirect problems