Hello here is what I could already have https://github.com/patbi/seedocauth but I would also like 1 - to redirect each type of users on his page 2 - Restrict access to the cat view for patients and visitors, but only accessible to doctors my json { "patients": { "fname": "patrick", "lname": "isaac", "username": "patient1", "password": "hello", "year_of_birth": 1990, "email": "biyagapatrick@provider.com", "civility": [ "single", "married", "other" ], "phone_number": 698780156, "sex": [ "M", "F"], "srcImg": "img/pat.jpg", "electronic_notebook": { "name": "notebook1", "description": "description1", "content": "content1", "datecreation": 23-11-2018, "consultationdate": 23-11-2018 }, "userRole": { "bitMask": 2, "title": "patients" }, "tokens": [] }, "doctors": { "fname": "doctor1", "lname": "doctor1", "username": "doctor1", "password": "world", "year_of_birth": 1990, "age": 28, "email": "doctor1@provider.com", "phone_number": 698780156, "srcImg": "img/pat.jpg", "specialty": "surgeon-dentist", "hospital": { "name": "seedoc", "country": { "name": "cameroon", "region": { "name": "center", "city": { "name": "yaoundé", "street": { "name": "deido", }, }, }, }, }, "userRole": { "bitMask": 4, "title": "doctors" }, "tokens": [] }, "admin": { "username": "admin", "name": "admin", "password": "admin", "email": "admin@admin.admin", "userRole": { "bitMask": 5, "title": "admin" }, "tokens": [] } }