How to test an app?

I started developping an app that is using a node.js server to login and log out the user (and do other stuff, but for now I only worked on login / log out and some other small things).
I would like to be able to test it on my device. The idea is:
the user types his uername and password and gets into the app, otherwise he gets an error message.

For now I only tested locally. How can I do to test it with a real remote server ?