Testing error function for log in