Added correct validation of expiration time on cookie in order to validate it