Added rudimentary authentication logic

By no means foolproof yet, but it is working.
Removed md5 in favor of sha256