Completed implementation of core functionalities

Implemented and tested on android logon using long-lived tokens.