Web users should be redirected to /login/prompt.php. From /login/prompt.php, json calls will be made to /login/service.php and depending on responses, appropriate information will be displaying in prompt.php. When login is successfull, json reply will contain the next_page variable. Bot applications will communicate with /login/service.php directly using json requests and replies. Signin.php will most probably will not be needed. Delete later. Need to include "rest-am-v1.0" library folder wherever it may be stored (use INCAM constant to point to it).