add helper method for valid sign in and have error message