The old condition always overwrote boolean values that were set to false with the default m( Check for undefined instead.
using a simple angular module for localstorage Note: it also saves the password into localStorage, this should be further improved to present a simple checkbox to the user asking if they want to save the password or not