Added some code snippets for user authentication

I threw together some functions for user definition with the help of
django documentation. I am still fighting with learning python so this
was the best I could do at the moment.