COOKIE logic shifted to SESSION logic

#Modification:
1. validation now based on SESSION tokens
2. setCookie() function name changed to refeshToken()
3. refreshToken() now sets/modifies the token in session var
4. csrftoken is refreshed in case of true validation only
5. Expiry time of token in cookie now 30 minutes
6. init() sets session in case not set!