New functions for case-insensitive usernames

Added new function for retrieving correct username
Added a constant for browser cache time
Added a function for POST JSON requests
Now usernames are case-insensitive