added logout feature, created auth.js, added methoed to user schema