Added validation to secret key. Prevents login with incorrect key length.