Adding user log history and permission access logic