Refactored user auth process.
Moved message timestamp generating to server side.
Added history loading.