Add security and cookies support