Bruteforce protection fixed. Email sender function added.