Added secret key setting.
Fixed syntax error.
Added ipware to get the ip of the client.