Move user switch code into a separate module

* Move user switch code from main.c into a separate module (usrsw)
* Add usrsw.c to Makefile
Merge pull request #82 from iabdalkader/master

Move user switch code into a separate module