encrypting username
encodeUsername and store it in cookie.

Use stored cookie as Authorization header for accessing REST apis.
added encoder.js
Changes for encrypting username to store in cookie.
Use pbkdf2 to hash the username.