Adding a cancel function in login delegate