finished basic authentication module