BPMS-1072: Login filter will return json data for unauthorized ajax call
WF-1693: Adding the previous action param to login url
BAM-138: Corrected the code to avoid NPE in case query string is not present in previous URL.