Highly luminescent and stable layered perovskite as the emitter for light emitting diodes