added a self written authentication system inspired by some railscasts