We develop social-based applications for mobile. Every application consumes RESTful API web-services. When I implement login I usually store the username and password somewhere on device. Then I send them and as a response I get access to my profile. But I also know there's another way to do this.
One somehow generates a token with a particular algorithm, and then send it instead of the username and password to gain access.
How should I implement that? Should I send this token along with every other request than login?