Login and Register initial functionality

Almost got the Login and register functionality to the original code
written by Scott.