Added the permission page and fixed a view bugs