Server

Fixed the server functions.
Moved from cookie based user storage to server/ database user storage