[#1745] rememberme cookie has a wrong expiration

The result of "Time.parseDuration(duration)" was treated as an Integer, and this can exceed the limit of Integer.MAX_VALUE very easily, we can cast to Long to prevent this issue.