Implemented server-side session check

track session cookies on the server and check validity