What about putting everything needed to be done in the background in a Rest Service? Authenticate the user with "IsLoggedIn".