Added more validation features

Shared language logic between server and client.
Changed security architecture

Changed from session-based auth to token-based auth
Fixed issue saving words

Fixed issue saving new words.