Fixes #5

Fixed #5. Frontend Javascript also need to be updated to use
'user/authenticate' api instead of 'authenticate.php' api