moved user permissions before register user