add login, missing 404 and few bug fixing