Updated as per comments and added refresh session

Updated as per comments and added refresh session