raw implementation of routing login in a node app