Added two parameters to the checkAccessSession()