Add log-in and register functionality