Magento: Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes)

Usually this is due to an miscoded or misguided error, but in case you try to login into magento on the front end, and you get this message, think back!

In our case, we made an account field mandatory. When a user tried to login and he/she did not fill that field before we made it mandatory, than the above message can occur.