Conversion to associative arrays for more easily readable/expandable code

Both the users and the session data is an associative array now, should be easier to expand on it.
Also, username is case-insensitive now.