Added support for cookie caching of not-logged in response

Uses same timeout as default for logged in response
Added missing check for user in session
Fixed incorrect property checking
Changed cookie timeout when user is not logged in. Now uses the refresh_timeout option.
Added git ignore
Added correct validation of expiration time on cookie in order to validate it
Always override expires when there is error (not logged in)
Added cache_notloggedin option, fixed indentation issues, fixed setting of default values