Check session_expires

I am not sure that I made it right, but please write if I am on the right way.

#2344