Login with remember me is not working as expected

Hi sir, i refered the code generation part of backendless and gotthe login page with a remember_me option so that i can login next time automatically. After logging into the main page successfully, instead of logging out if i click the backbutton of my phone the app closes and then i cant login automatically next time as the session might have been ended. If i click the home button and try launching the app next time it works fine and only issue with the back button from the main Activity.
attaching My loginActivity code backendless section:

please respond any method so that i can click back button and the user session wont end.
Thanks in Advance.

Hi, Christie.

As far as I understand you define whether or not the user is still logged in with Backendless.UserService.isValidLogin() method. This method has a complex logic and not always gives the expected result.
The most reliable method to define whether the user is still logged in is to try to perform some operation that is allowed only for logged in user. You can set permissions in Backendless Console as shown here or here.

Ok that didnt make any sense for sure. In simple sentence i asked y is that the user gets logged his session when i exit the app using back button and thus need to login the second time. Hope anyone has ideas.