Wrote user authentication module.