implemented the permission data using DB
Added Loading dialog