Implementing portal and fixing various bugs in android app