keycloak-aplcache

stuff

2/10/2014 10:02:55 PM

Changes

forms/common-themes/src/main/resources/theme/login/rcue/resources/css/base.css 52(+0 -52)

forms/common-themes/src/main/resources/theme/login/rcue/resources/css/forms.css 515(+0 -515)

forms/common-themes/src/main/resources/theme/login/rcue/resources/css/login-register.css 437(+0 -437)

misc/logo/login-bg.svg 318(+318 -0)

server/pom.xml 5(+5 -0)

Details

diff --git a/examples/themes/login/sunrise/resources/css/styles.css b/examples/themes/login/sunrise/resources/css/styles.css
index bf9d004..f7d01e8 100644
--- a/examples/themes/login/sunrise/resources/css/styles.css
+++ b/examples/themes/login/sunrise/resources/css/styles.css
@@ -17,13 +17,13 @@ a {
 
 .content {
     position: absolute;
-    top: 25%;
+    top: 30%;
     left: 50%;
     width: 550px;
     margin-left: -225px;
 }
 
-h2 {
+h2#kc-header {
     position: fixed;
     top: 50px;
     left: 0;
@@ -149,7 +149,7 @@ div.feedback p {
     padding: 1em;
 }
 
-div.rcue-logo {
+h1.kc-title {
     background-image: url('../img/logo.png');
     background-repeat: no-repeat;
     height: 500px;
@@ -158,6 +158,7 @@ div.rcue-logo {
     top: 30px;
     width: 500px;
     z-index: -1;
+    text-indent: -9999px;
 }
 
 div.social-login span {
diff --git a/forms/common-freemarker/src/main/java/org/keycloak/freemarker/ThemeLoader.java b/forms/common-freemarker/src/main/java/org/keycloak/freemarker/ThemeLoader.java
index f62b4f9..ce9f34a 100644
--- a/forms/common-freemarker/src/main/java/org/keycloak/freemarker/ThemeLoader.java
+++ b/forms/common-freemarker/src/main/java/org/keycloak/freemarker/ThemeLoader.java
@@ -17,8 +17,8 @@ import java.util.Properties;
 public class ThemeLoader {
 
     private static final Logger logger = Logger.getLogger(ThemeLoader.class);
+    private static String DEFAULT = "keycloak";
     public static final String BASE = "base";
-    public static String DEFAULT = BASE;
 
     public static Theme createTheme(String name, Theme.Type type) throws FreeMarkerException {
         if (name == null) {
diff --git a/forms/common-themes/src/main/java/org/keycloak/theme/DefaultLoginThemeProvider.java b/forms/common-themes/src/main/java/org/keycloak/theme/DefaultLoginThemeProvider.java
index 7d98d3d..fbdb768 100644
--- a/forms/common-themes/src/main/java/org/keycloak/theme/DefaultLoginThemeProvider.java
+++ b/forms/common-themes/src/main/java/org/keycloak/theme/DefaultLoginThemeProvider.java
@@ -17,10 +17,6 @@ public class DefaultLoginThemeProvider implements ThemeProvider {
     public static final String RCUE = "rcue";
     public static final String KEYCLOAK = "keycloak";
 
-    static {
-        ThemeLoader.DEFAULT = KEYCLOAK;
-    }
-
     private static Set<String> defaultThemes = new HashSet<String>();
 
     static {
diff --git a/forms/common-themes/src/main/resources/theme/account/rcue/resources/css/forms.css b/forms/common-themes/src/main/resources/theme/account/rcue/resources/css/forms.css
index 1dc3c5d..32fa9f2 100644
--- a/forms/common-themes/src/main/resources/theme/account/rcue/resources/css/forms.css
+++ b/forms/common-themes/src/main/resources/theme/account/rcue/resources/css/forms.css
@@ -510,3 +510,7 @@ input[type="email"].tiny {
   font-size: 1.1em;
   margin-right: 0.90909090909091em;
 }
+
+ul.nav li {
+    z-index: 200;
+}
\ No newline at end of file
diff --git a/forms/common-themes/src/main/resources/theme/login/base/error.ftl b/forms/common-themes/src/main/resources/theme/login/base/error.ftl
index ca5a65d..3bdb322 100755
--- a/forms/common-themes/src/main/resources/theme/login/base/error.ftl
+++ b/forms/common-themes/src/main/resources/theme/login/base/error.ftl
@@ -1,6 +1,5 @@
-<#-- TODO: Only a placeholder, implementation needed -->
 <#import "template.ftl" as layout>
-<@layout.registrationLayout; section>
+<@layout.registrationLayout displayMessage=false; section>
     <#if section = "title">
     ${rb.errorTitle}
 
@@ -9,8 +8,7 @@
 
     <#elseif section = "form">
     <div id="kc-error-message">
-        <p class="instruction">${rb.errorGenericMsg}</p>
-        <p id="error-summary" class="instruction second">${message.summary}</p>
+        <p class="instruction">${message.summary}</p>
     </div>
     </#if>
 </@layout.registrationLayout>
\ No newline at end of file
diff --git a/forms/common-themes/src/main/resources/theme/login/base/login.ftl b/forms/common-themes/src/main/resources/theme/login/base/login.ftl
index 1d76955..87dbe95 100755
--- a/forms/common-themes/src/main/resources/theme/login/base/login.ftl
+++ b/forms/common-themes/src/main/resources/theme/login/base/login.ftl
@@ -9,7 +9,7 @@
     <#elseif section = "form">
     <form id="kc-form-login" action="${url.loginAction}" method="post">
         <div class="field-wrapper">
-            <label for="username">${rb.username}</label><input id="username" name="username" value="${login.username!''}" type="text" />
+            <label for="username">${rb.username}</label><input id="username" name="username" value="${login.username!''}" type="text" autofocus />
         </div>
         <div class="field-wrapper">
             <label for="password">${rb.password}</label><input id="password" name="password" type="password" />
diff --git a/forms/common-themes/src/main/resources/theme/login/base/login-config-totp.ftl b/forms/common-themes/src/main/resources/theme/login/base/login-config-totp.ftl
index facbf26..4a158d2 100755
--- a/forms/common-themes/src/main/resources/theme/login/base/login-config-totp.ftl
+++ b/forms/common-themes/src/main/resources/theme/login/base/login-config-totp.ftl
@@ -9,23 +9,23 @@
     <#elseif section = "form">
     <ol id="kc-totp-settings">
         <li>
-            <p><strong>1</strong>${rb.loginTotpStep1_1} <a href="http://code.google.com/p/google-authenticator/" target="_blank">${rb.loginTotpStep1_2}</a> ${rb.loginTotpStep1_3}</p>
+            <p>${rb.loginTotpStep1_1} <a href="http://code.google.com/p/google-authenticator/" target="_blank">${rb.loginTotpStep1_2}</a> ${rb.loginTotpStep1_3}</p>
         </li>
-        <li class="clearfix">
-            <p><strong>2</strong>${rb.loginTotpStep2}</p>
+        <li>
+            <p>${rb.loginTotpStep2}</p>
             <img src="${totp.totpSecretQrCodeUrl}" alt="Figure: Barcode">
             <span class="code">${totp.totpSecretEncoded}</span>
         </li>
-        <li class="clearfix">
-            <p><strong>3</strong>${rb.loginTotpStep3}</p>
-            <form action="${url.loginUpdateTotpUrl}" method="post">
-                <div class="field-wrapper">
-                    <label for="otp" class="two-lines">${rb.loginTotpOneTime}</label><input type="text" id="totp" name="totp" />
-                    <input type="hidden" id="totpSecret" name="totpSecret" value="${totp.totpSecret}" />
-                </div>
-                <input type="submit" class="btn-primary" value="${rb.submit}" />
-            </form>
+        <li>
+            <p>${rb.loginTotpStep3}</p>
         </li>
     </ol>
+    <form action="${url.loginUpdateTotpUrl}" id="kc-totp-settings-form" method="post">
+        <div class="field-wrapper">
+            <label for="otp" class="two-lines">${rb.loginTotpOneTime}</label><input type="text" id="totp" name="totp" />
+            <input type="hidden" id="totpSecret" name="totpSecret" value="${totp.totpSecret}" />
+        </div>
+        <input type="submit" class="btn-primary" value="${rb.submit}" />
+    </form>
     </#if>
 </@layout.registrationLayout>
\ No newline at end of file
diff --git a/forms/common-themes/src/main/resources/theme/login/base/login-update-profile.ftl b/forms/common-themes/src/main/resources/theme/login/base/login-update-profile.ftl
index ee77a9e..cb1ed67 100755
--- a/forms/common-themes/src/main/resources/theme/login/base/login-update-profile.ftl
+++ b/forms/common-themes/src/main/resources/theme/login/base/login-update-profile.ftl
@@ -6,15 +6,8 @@
     <#elseif section = "header">
     ${rb.loginProfileTitle}
 
-    <#elseif section = "feedback">
-    <div id="kc-feedback" class="feedback warning show">
-        <p><strong>${rb.loginProfileWarning}</strong><br>${rb.loginProfileWarningFollow}</p>
-    </div>
     <#elseif section = "form">
     <form id="kc-update-profile-form" action="${url.loginUpdateProfileUrl}" method="post">
-        <div class="feedback error bottom-left">
-            <p><strong>${rb.loginProfileError}</strong><br>${rb.loginProfileErrorSteps}</p>
-        </div>
         <p class="subtitle">All fields required</p>
         <div class="field-wrapper">
             <label for="email">${rb.email}</label><input type="text" id="email" name="email" value="${user.email!''}" />
diff --git a/forms/common-themes/src/main/resources/theme/login/base/login-verify-email.ftl b/forms/common-themes/src/main/resources/theme/login/base/login-verify-email.ftl
index e326e2a..f687c6b 100755
--- a/forms/common-themes/src/main/resources/theme/login/base/login-verify-email.ftl
+++ b/forms/common-themes/src/main/resources/theme/login/base/login-verify-email.ftl
@@ -7,7 +7,7 @@
     ${rb.emailVerifyTitle}
 
     <#elseif section = "form">
-    <div id="kc-verify-email" class="app-form">
+    <div id="kc-verify-email">
         <p class="instruction">
             ${rb.emailVerifyInstr}
         </p>
diff --git a/forms/common-themes/src/main/resources/theme/login/base/register.ftl b/forms/common-themes/src/main/resources/theme/login/base/register.ftl
index 2c8cc40..63eef0b 100755
--- a/forms/common-themes/src/main/resources/theme/login/base/register.ftl
+++ b/forms/common-themes/src/main/resources/theme/login/base/register.ftl
@@ -1,5 +1,5 @@
 <#import "template.ftl" as layout>
-<@layout.registrationLayout bodyClass="register" displaySeparator=true; section>
+<@layout.registrationLayout displaySeparator=true; section>
     <#if section = "title">
     ${rb.registerWith} ${realm.name}
 
diff --git a/forms/common-themes/src/main/resources/theme/login/base/template.ftl b/forms/common-themes/src/main/resources/theme/login/base/template.ftl
index e3d0e27..88276f8 100644
--- a/forms/common-themes/src/main/resources/theme/login/base/template.ftl
+++ b/forms/common-themes/src/main/resources/theme/login/base/template.ftl
@@ -1,4 +1,4 @@
-<#macro registrationLayout bodyClass="" displaySeparator=false displaySocial=false>
+<#macro registrationLayout bodyClass="" displaySeparator=false displaySocial=false displayMessage=true>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 
@@ -25,8 +25,8 @@
         <div class="background-area">
             <div class="form-area ${displaySocial?string('social','')} ${displaySeparator?string('separator','')} clearfix">
                 <div class="section app-form">
-                    <#if message?has_content>
-                        <div class="feedback ${message.type} bottom-left show">
+                    <#if displayMessage && message?has_content>
+                        <div class="feedback ${message.type}">
                             <p><strong>${message.summary}</strong></p>
                         </div>
                     </#if>
diff --git a/forms/common-themes/src/main/resources/theme/login/keycloak/resources/css/styles.css b/forms/common-themes/src/main/resources/theme/login/keycloak/resources/css/styles.css
index dcefec6..9c4d50f 100644
--- a/forms/common-themes/src/main/resources/theme/login/keycloak/resources/css/styles.css
+++ b/forms/common-themes/src/main/resources/theme/login/keycloak/resources/css/styles.css
@@ -25,4 +25,8 @@ a.button.btn-primary {
     background-image: -ms-linear-gradient(top, #1f97d8 0%, #1280bc 100%);
     background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #1f97d8), color-stop(1, 0, #1280bc));
     border-color: #005e91;
-}
\ No newline at end of file
+}
+
+.kc-login-register p.powered a {
+    color: #ccc;
+}
diff --git a/forms/common-themes/src/main/resources/theme/login/keycloak/resources/img/login-bg.png b/forms/common-themes/src/main/resources/theme/login/keycloak/resources/img/login-bg.png
index 6fcf92b..0260cfb 100644
Binary files a/forms/common-themes/src/main/resources/theme/login/keycloak/resources/img/login-bg.png and b/forms/common-themes/src/main/resources/theme/login/keycloak/resources/img/login-bg.png differ
diff --git a/forms/common-themes/src/main/resources/theme/login/keycloak/theme.properties b/forms/common-themes/src/main/resources/theme/login/keycloak/theme.properties
index 9898eae..20914a0 100644
--- a/forms/common-themes/src/main/resources/theme/login/keycloak/theme.properties
+++ b/forms/common-themes/src/main/resources/theme/login/keycloak/theme.properties
@@ -1,2 +1,2 @@
 parent=rcue
-styles=../rcue/css/styles.css css/styles.css
\ No newline at end of file
+styles=../rcue/css/reset.css ../rcue/lib/zocial/zocial.css ../rcue/css/styles.css css/styles.css
\ No newline at end of file
diff --git a/forms/common-themes/src/main/resources/theme/login/rcue/resources/css/styles.css b/forms/common-themes/src/main/resources/theme/login/rcue/resources/css/styles.css
index 2dab25a..5106c53 100644
--- a/forms/common-themes/src/main/resources/theme/login/rcue/resources/css/styles.css
+++ b/forms/common-themes/src/main/resources/theme/login/rcue/resources/css/styles.css
@@ -1,12 +1,959 @@
-@IMPORT url("reset.css");
-@IMPORT url("base.css");
-@IMPORT url("forms.css");
-@IMPORT url("../lib/zocial/zocial.css");
-@IMPORT url("login-register.css");
+* {
+    -moz-box-sizing: border-box;
+    -o-box-sizing: border-box;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    margin: 0;
+    padding: 0;
+    font-family: "Open Sans", sans-serif;
+}
+body {
+    height: 100%;
+    width: 100%;
+    font-family: "Open Sans", sans-serif;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+    font-weight: normal;
+    font-family: "Overpass", sans-serif;
+}
+a {
+    color: #0099d3;
+    text-decoration: none;
+}
+a:hover {
+    text-decoration: underline;
+}
+/* Styles from Gabriel */
+strong {
+    font-weight: bold;
+}
+.hidden {
+    display: none;
+}
+.pull-right {
+    float: right;
+}
+.block {
+    display: block;
+}
+a:focus {
+    outline: 0 none;
+}
+.clear-font-size {
+    font-size: 1em;
+}
+
+fieldset {
+    border: none;
+}
+fieldset.border-top {
+    border-color: #E9E8E8;
+    border-style: solid;
+    border-width: 1px 0 0;
+    padding-top: 2em;
+}
+*::-moz-placeholder,
+::-webkit-input-placeholder {
+    color: #838383;
+    font-style: italic;
+}
+input[type="text"],
+input[type="password"],
+input[type="email"] {
+    font-size: 1.1em;
+    padding: 0 0.545454545454545em;
+    min-width: 18.1818181818182em;
+    height: 2.36363636363636em;
+    border: 1px #b6b6b6 solid;
+    border-radius: 2px;
+    box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1);
+    color: #333;
+}
+input[type="text"]:hover,
+input[type="password"]:hover,
+input[type="email"]:hover {
+    border-color: #62afdb;
+}
+input[type="text"]:focus,
+input[type="password"]:focus,
+input[type="email"]:focus {
+    border-color: #62afdb;
+    box-shadow: #62afdb 0 0 5px;
+}
+input[type="text"].error,
+input[type="password"].error,
+input[type="email"].error {
+    border-color: #ba1212;
+    transition: all 0.33s ease-in-out;
+    -moz-transition: all 0.33s ease-in-out;
+    -webkit-transition: all 0.33s ease-in-out;
+}
+input[type="text"].error:focus,
+input[type="password"].error:focus,
+input[type="email"].error:focus {
+    box-shadow: 0 0 5px #ba1212;
+}
+input[type="button"],
+button,
+input[type="submit"],
+a.button {
+    font-size: 1.3em;
+    padding: 0.30769230769231em 1.07692307692308em;
+    border-width: 1px;
+    border-radius: 2px;
+    color: #fff;
+    font-weight: bold;
+    letter-spacing: 0.04em;
+    box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.15);
+}
+input[type="button"].btn-primary,
+button.btn-primary,
+input[type="submit"].btn-primary,
+a.button.btn-primary {
+    background-image: linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -o-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -moz-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -webkit-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -ms-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #00a9ec), color-stop(1, 0, #009bd3));
+    border-color: #21799e;
+    border-style: solid;
+}
+input[type="button"].btn-primary:hover,
+input[type="submit"].btn-primary:hover,
+button.btn-primary:hover,
+a.button.btn-primary:hover,
+input[type="button"].btn-primary:focus,
+input[type="submit"].btn-primary:focus,
+button.btn-primary:focus,
+a.button.btn-primary:focus {
+    background-color: #009BD3;
+}
+input[type="button"].btn-primary:active,
+input[type="submit"].btn-primary:active,
+button.btn-primary:active,
+a.button.btn-primary:active {
+    background-color: #0099d4;
+}
+input[type="button"].disabled,
+input[type="submit"].disabled,
+button.disabled,
+a.button.disabled {
+    border-color: #cfcdcd;
+    color: #838383;
+    background-color: transparent;
+    background-image: none;
+    box-shadow: none;
+    font-weight: normal;
+    letter-spacing: 0.06363636363636em;
+}
+
+input[type="button"].btn-secondary,
+button.btn-secondary,
+input[type="submit"].btn-secondary,
+a.button.btn-secondary {
+    background-color: #EEEEEE;
+    border-color: #BBBBBB;
+    color: #4D5258;
+}
+
+input[type="button"].disabled:hover,
+input[type="submit"].disabled:hover,
+button.disabled:hover,
+a.button.disabled:hover {
+    cursor: default;
+}
+input[type="button"].disabled:active,
+input[type="submit"].disabled:active,
+button.disabled:active,
+a.button.disabled:active {
+    box-shadow: none;
+}
+input[type="button"]:hover,
+input[type="submit"]:hover,
+button:hover,
+a.button:hover,
+input[type="button"]:focus,
+input[type="submit"]:focus,
+button:focus,
+a.button:focus {
+    background-image: none;
+    cursor: pointer;
+}
+input[type="button"]:active,
+input[type="submit"]:active,
+button:active,
+a.button:active {
+    background-image: none;
+    cursor: pointer;
+    box-shadow: inset 0 0 5px 2px rgba(0, 0, 0, 0.25);
+}
+input[type="checkbox"] {
+    margin-right: 0.5em;
+}
+/* Code from Hylke */
+button,
+a.button {
+    border-color: #21799e;
+    background-image: linear-gradient(top, #fafafa 0%, #ededed 100%);
+    background-image: -o-linear-gradient(top, #fafafa 0%, #ededed 100%);
+    background-image: -moz-linear-gradient(top, #fafafa 0%, #ededed 100%);
+    background-image: -webkit-linear-gradient(top, #fafafa 0%, #ededed 100%);
+    background-image: -ms-linear-gradient(top, #fafafa 0%, #ededed 100%);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fafafa), color-stop(1, 0, #ededed));
+    color: #fff;
+    padding: 4px 14px;
+    border: 1px #bbb solid;
+    border-radius: 2px;
+    color: #4d5258;
+    font-weight: bold;
+    font-size: 1.1em;
+    letter-spacing: 0.4px;
+    cursor: pointer;
+    padding-top: 0;
+    padding-bottom: 0;
+    line-height: 2.18181818181818em;
+}
+input[type='submit'].primary,
+button.primary {
+    border-color: #21799e;
+    background-image: linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -o-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -moz-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -webkit-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -ms-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #00a9ec), color-stop(1, 0, #009bd3));
+    color: #fff;
+}
+button.primary:hover,
+button.primary:focus {
+    background-color: #009BD3;
+}
+button.primary:enabled:active {
+    background-color: #0099d4;
+    box-shadow: inset 0 0 5px 3px #0074ae;
+}
+/* Code from Gabriel */
+.kc-login-register.register .two-fields input[type="text"] {
+    width: 121px;
+    min-width: 0;
+}
+.kc-login-register.register .two-fields input + input {
+    margin-left: 10px;
+}
+.search-comp {
+    position: relative;
+    display: inline-block;
+    font-size: 0.90909090909091em;
+}
+.search-comp input[type="text"] {
+    padding-right: 2.45454545454545em;
+}
+.search-comp .icon-search {
+    position: absolute;
+    right: 0.2em;
+    top: 0.4em;
+    opacity: 0.5;
+}
+.search-comp .icon-search:hover {
+    opacity: 1;
+    -webkit-transition: ease-in-out opacity 0.25s;
+    -moz-transition: ease-in-out opacity 0.25s;
+    -o-transition: ease-in-out opacity 0.25s;
+    transition: ease-in-out opacity 0.25s;
+}
+.search-comp .icon-search + .tooltip {
+    width: 20em;
+    font-weight: normal;
+}
+button,
+a.button {
+    background-color: #eeeeee;
+}
+a.button {
+    display: inline-block;
+}
+a.button:hover {
+    color: #4D5258;
+    text-decoration: none;
+}
+button[class^="icon-"] {
+    border: none;
+    box-shadow: none;
+    background-color: transparent;
+    padding: 0;
+    line-height: 1em;
+}
+
+legend {
+    font-size: 1em;
+    border-width: 1px 0 0 0;
+    border-style: solid;
+    border-color: #e9e8e8;
+    padding-top: 2em;
+    display: block;
+    margin-bottom: 0;
+    padding-bottom: 0.8em;
+    cursor: pointer;
+}
+legend .icon-collapse {
+    vertical-align: baseline;
+}
+legend .text {
+    font-weight: bold;
+    font-size: 1.25em;
+}
+
+.form-group {
+    display: block;
+    margin-bottom: 1em;
+    position: relative;
+}
+.form-group > label {
+    font-size: 1.1em;
+    font-weight: 300;
+    width: 10em;
+    margin-right: 0.90909090909091em;
+    margin-bottom: 0;
+    float: left;
+    margin-top: 0.45454545454545em;
+}
+.form-group > label.two-lines {
+    margin-top: -2px;
+}
+.form-group > label + span {
+    font-size: 1.1em;
+    display: inline-block;
+    margin-top: 0.454545454545455em;
+}
+.form-group > label + .onoffswitch {
+    float: left;
+}
+.form-group > label.pull-left {
+    margin-top: 4px;
+}
+.form-group .required {
+    position: absolute;
+    left: 10em;
+    font-size: 1.1em;
+    color: #CB2915;
+}
+legend + .form-group {
+    padding-top: 1em;
+}
+legend + table {
+    margin-top: 1em;
+}
+.code {
+    font-family: Courier, monospace;
+}
+.onoffswitch {
+    -moz-user-select: none;
+    height: 26px;
+    position: relative;
+    width: 62px;
+}
+.onoffswitch .onoffswitch-checkbox {
+    display: none;
+}
+.onoffswitch .onoffswitch-label {
+    border: 1px solid #bbb;
+    border-radius: 2px;
+    cursor: pointer;
+    display: block;
+    overflow: hidden;
+    width: 62px;
+}
+.onoffswitch .onoffswitch-inner {
+    display: block;
+    margin-left: -100%;
+    transition: margin 0.3s ease-in 0s;
+    width: 200%;
+}
+.onoffswitch .onoffswitch-inner > span {
+    -moz-box-sizing: border-box;
+    color: white;
+    float: left;
+    font-size: 11px;
+    font-family: "Open Sans", sans-serif;
+    font-weight: bold;
+    height: 24px;
+    line-height: 24px;
+    padding: 0;
+    width: 50%;
+}
+.onoffswitch .onoffswitch-switch {
+    background-image: linear-gradient(top, #fafafa 0%, #ededed 100%);
+    background-image: -o-linear-gradient(top, #fafafa 0%, #ededed 100%);
+    background-image: -moz-linear-gradient(top, #fafafa 0%, #ededed 100%);
+    background-image: -webkit-linear-gradient(top, #fafafa 0%, #ededed 100%);
+    background-image: -ms-linear-gradient(top, #fafafa 0%, #ededed 100%);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fafafa), color-stop(1, 0, #ededed));
+    border: 1px solid #aaa;
+    border-radius: 2px;
+    bottom: 0;
+    margin: 0;
+    position: absolute;
+    right: 39px;
+    top: 0;
+    transition: all 0.3s ease-in 0s;
+    -webkit-transition: all 0.3s ease-in 0s;
+    width: 23px;
+}
+.onoffswitch .onoffswitch-inner .onoffswitch-active {
+    background-image: linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -o-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -moz-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -webkit-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -ms-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #00a9ec), color-stop(1, 0, #009bd3));
+    color: #FFFFFF;
+    padding-left: 10px;
+}
+.onoffswitch .onoffswitch-inner .onoffswitch-inactive {
+    background: linear-gradient(#fefefe, #e8e8e8) repeat scroll 0 0 transparent;
+    color: #4d5258;
+    padding-right: 10px;
+    text-align: right;
+}
+.onoffswitch .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
+    margin-left: 0;
+}
+.onoffswitch .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
+    right: 0;
+}
+input[type="text"].tiny,
+input[type="password"].tiny,
+input[type="email"].tiny {
+    min-width: 40px;
+    width: 40px;
+}
+.select-rcue:hover {
+    border-color: #62afdb;
+}
+.select-rcue:focus {
+    border-color: #62afdb;
+    box-shadow: #62afdb 0 0 5px;
+}
+.select-rcue.error {
+    border-color: #ba1212;
+    background-color: #f8e7e7;
+    transition: all 0.33s ease-in-out;
+    -moz-transition: all 0.33s ease-in-out;
+    -webkit-transition: all 0.33s ease-in-out;
+}
+.select-rcue.error:focus {
+    box-shadow: 0 0 5px #ba1212;
+}
+.select-rcue select {
+    height: 30px;
+    line-height: 30px;
+    margin-top: -2px;
+    margin-left: -2px;
+    font-size: 1.1em;
+    padding: 5px 0.545454545454545em;
+    background-color: transparent;
+    border: none;
+    width: 150%;
+    font-family: "Open Sans", sans-serif;
+}
+.select-rcue option {
+    line-height: 2em;
+    padding-left: 0.90909090909091em;
+}
+.select-rcue option:hover {
+    background-color: #d5ecf9;
+}
+
+.input-group input + .select-rcue {
+    border-radius: 0 2px 2px 0;
+    border-left: 0;
+    display: inline-block;
+}
+.input-select .input-group input {
+    float: left;
+}
+
+.form-actions {
+    float: right;
+    margin-top: 3em;
+    margin-bottom: 5em;
+}
+.form-actions .primary {
+    float: right;
+    margin-left: 0.90909090909091em;
+}
+.form-actions a {
+    font-size: 1.1em;
+    margin-right: 0.90909090909091em;
+}
+
+body {
+    font-size: 62.5%;
+    min-height: 60em;
+    min-width: 120em;
+}
+
+body.kc-login-register {
+    background-image: url("../img/login-bkgrnd.png");
+}
+
+.kc-title {
+    background-image: url("../img/keycloak-logo.png");
+    background-repeat: no-repeat;
+    text-indent: -9999px;
+    height: 37px;
+    width: 150px;
+    position: absolute;
+    top: 5em;
+    right: 6.4em;
+}
+
+.kc-login-register {
+    background-color: #1D2226;
+    background-position: top left;
+    background-size: auto;
+    background-repeat: no-repeat;
+    color: #fff;
+    /* Login area */
+
+    /* Social login area */
+
+    /* Info area */
+
+}
+
+.kc-login-register h1 a {
+    position: absolute;
+    top: 5em;
+    right: 6.4em;
+}
+.kc-login-register .content {
+    position: absolute;
+    bottom: 10%;
+    width: 100%;
+    min-width: 76em;
+}
+.kc-login-register h2 {
+    padding-left: 4.34782608695652em;
+    font-family: "Overpass", sans-serif;
+    font-size: 2.3em;
+    font-weight: 100;
+    text-transform: uppercase;
+    letter-spacing: 0.005em;
+}
+.kc-login-register h2 strong {
+    font-weight: bold;
+}
+.kc-login-register .background-area {
+    border-top: 0.1em rgba(255, 255, 255, 0.05) solid;
+    border-bottom: 0.1em rgba(255, 255, 255, 0.05) solid;
+    background-color: rgba(0, 0, 0, 0.3);
+    padding: 3em 0 3em 10em;
+    margin-top: 2.7em;
+    width: 100%;
+    min-width: 120em;
+}
+.kc-login-register .form-area.separator,
+.kc-login-register .form-area.social,
+.kc-login-register .form-area.social.separator {
+    background-repeat: no-repeat;
+    background-position: 42.7em center;
+}
+.kc-login-register .form-area.separator {
+    background-image: url(../img/login-register-separator.png);
+    background-position: 43.2em center;
+}
+.kc-login-register .form-area.social {
+    background-image: url(../img/login-register-social.png);
+}
+.kc-login-register .form-area.social.separator {
+    background-image: url(../img/login-register-social-separator.png);
+}
+.kc-login-register .background-area .section {
+    float: left;
+    padding: 0 4.5em 0 4.6em;
+    width: auto;
+    position: relative;
+}
+.kc-login-register .background-area .section,
+.kc-login-register .background-area .social .section {
+    padding-top: 1.5em;
+    padding-bottom: 1.5em;
+}
+.kc-login-register .background-area .section h3 {
+    display: none;
+}
+.kc-login-register .background-area .section:first-child {
+    padding-right: 4.5em;
+}
+.kc-login-register .section > p {
+    font-size: 1.3em;
+    margin-bottom: 1.53846153846154em;
+    line-height: 1.3em;
+}
+.kc-login-register .section.app-form {
+    padding-left: 0;
+    position: relative;
+}
+.kc-login-register form > div {
+    margin-bottom: 1em;
+}
+.kc-login-register label,
+.kc-login-register .social-login > p {
+    display: inline-block;
+    font-size: 1.4em;
+    font-weight: 400;
+}
+.kc-login-register label {
+    width: 8.21428571428571em;
+}
+.kc-login-register label.two-lines {
+    float: left;
+    margin-top: -0.14285714285714em;
+    line-height: 1.1em;
+}
+.kc-login-register input[type="text"],
+.kc-login-register input[type="password"] {
+    width: 24.7272727272727em;
+    /* 272px */
+
+}
+.kc-login-register form > div.aside-btn {
+    float: left;
+    font-size: 1.1em;
+    margin-left: 10.4545454545454em;
+    margin-top: 0.90909090909091em;
+    margin-bottom: 0;
+}
+.kc-login-register form > div.aside-btn label {
+    font-size: 1em;
+    width: auto;
+}
+.kc-login-register form > div.aside-btn input[type="checkbox"] {
+    margin-bottom: 0.54545454545455em;
+    /* 6px */
+}
+.kc-login-register form > input[type="button"],
+.kc-login-register form > input[type="submit"]{
+    float: right;
+    margin-top: 0.76923076923077em;
+    margin-left: 0.90909090909091em;
+    /* 10px */
+
+}
+.kc-login-register p.subtitle {
+    font-size: 1.1em;
+    color: #999;
+    position: absolute;
+    right: 4.09090909090909em;
+    top: -0.636363636363636em;
+}
+.kc-login-register input.error[type="text"],
+.kc-login-register input.error[type="password"],
+.kc-login-register input.error[type="email"] {
+    background-color: #F8E7E7;
+}
+.kc-login-register .section.social-login > span {
+    display: none;
+}
+.kc-login-register .section.social-login > p {
+    float: left;
+    margin-top: 0.28571428571429em;
+    /* 14px */
+
+    width: 6.78571428571429em;
+    /* 95px */
+
+}
+.kc-login-register .section.social-login > ul {
+    float: left;
+}
+.kc-login-register .section.social-login li {
+    margin-bottom: 2em;
+}
+.kc-login-register .section.social-login li:last-child {
+    margin-bottom: 0;
+}
+.kc-login-register .section.info-area {
+    padding-right: 0;
+}
+.kc-login-register .section.info-area p,
+.kc-login-register .section.info-area li {
+    font-size: 1.4em;
+    margin-bottom: 1.64285714285714em;
+}
+.kc-login-register .section.info-area li {
+    color: #999;
+    margin-bottom: 1em;
+}
+.kc-login-register .section.info-area li:last-child {
+    margin-bottom: 0;
+}
+@media screen and (min-width: 1280px) {
+    .kc-login-register {
+        background-size: 100% auto;
+    }
+}
+/* Social buttons */
+.zocial,
+a.zocial {
+    padding: 0;
+    line-height: 2.3em;
+    height: 2.3em;
+    width: 131px;
+    border-radius: 2px;
+    box-shadow: none;
+    background-image: none;
+    text-shadow: none;
+}
+.zocial .text,
+a.zocial .text {
+    font-size: 1.2em;
+    line-height: 1.25em;
+    text-align: center;
+    display: block;
+    font-family: "Open Sans", sans-serif;
+    font-weight: normal;
+    border-left: 1px solid rgba(0, 0, 0, 0.15);
+    margin-left: 3em;
+    /* 36 px */
+
+    margin-top: 0.25em;
+    /* 3px */
+
+}
+.zocial:hover,
+a.zocial:hover,
+.zocial:active,
+a.zocial:active,
+.zocial:focus,
+a.zocial:focus {
+    text-decoration: none;
+    background-image: none;
+}
+.zocial:hover,
+a.zocial:hover {
+    background-image: linear-gradient(rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);
+}
+.zocial:before,
+a.zocial:before {
+    margin: 0;
+    padding: 0;
+    box-shadow: none;
+    border: none;
+    width: 3em;
+    /* 36px */
+
+}
+.zocial.facebook:before {
+    width: 2.66666666666667em;
+    /* 32px */
+}
+/* Register page */
+.kc-login-register.register label {
+    width: 7.5em;
+    /* 105px */
+
+}
+.kc-login-register.register input[type="text"],
+.kc-login-register.register input[type="email"],
+.kc-login-register.register input[type="password"] {
+    width: 22.9090909090909em;
+    /* 252px */
+
+}
+.kc-login-register.register form > div.aside-btn {
+    margin-left: 9.54545454545454em;
+    /* 105px */
+
+    width: 12.5454545454546em;
+    /* 138px */
+
+}
+.kc-login-register.register form > div.aside-btn p {
+    line-height: 1.3em;
+}
+.kc-login-register p.powered {
+    font-size: 1.1em;
+    margin-top: 1.27272727272727em;
+    text-align: right;
+    margin-right: 5.81818181818182em;
+}
+.kc-login-register p.powered a {
+    color: #666;
+}
+.kc-login-register p.powered a:hover {
+    color: #0099D3;
+}
+/* Forgot Password page */
+.kc-login-register.reset .background-area .section.app-form {
+    width: 43.2em;
+}
+.kc-login-register.oauth .form-actions {
+    margin-bottom: 0;
+    margin-top: 2em;
+}
+.kc-login-register .background-area .content-area {
+    width: 50em;
+}
+.kc-login-register .background-area .content-area ul {
+    border-bottom: 1px solid #34393C;
+    margin-bottom: 2em;
+}
+.kc-login-register .background-area .content-area ul li {
+    border-top: 1px solid #34393C;
+    padding: 2em;
+    position: relative;
+}
+.kc-login-register .background-area .content-area ul li span {
+    font-size: 1.3em;
+    line-height: 1.3em;
+}
+
+.kc-login-register .background-area .content-area ul li span:first-child {
+    padding-right: 11.5384615384615em;
+}
+
+.kc-login-register .background-area .content-area ul li span.parent {
+    position: absolute;
+    left: 26em;
+    top: 1.53846153846154em;
+    width: 12.3076923076923em;
+}
+
+.kc-login-register .background-area .content-area ul li span.icon-info {
+    float: right;
+    margin-top: 0.5em;
+}
+.kc-login-register .background-area .content-area p.terms {
+    color: #999999;
+    font-size: 1.1em;
+    line-height: 1.3em;
+}
+
+.kc-login-register.reset p.subtitle {
+    margin-bottom: 10px;
+    position: inherit;
+    text-align: right;
+}
+
+.kc-login-register .background-area p.instruction {
+    font-size: 1.3em;
+    line-height: 1.3em;
+    margin-bottom: 1.53846em;
+}
+
+.kc-login-register .background-area p.instruction.instruction.second {
+    color: #999999;
+}
+.kc-login-register .background-area p.instruction + .instruction.second {
+    margin-top: -1.23077em;
+}
+
+.kc-login-register .background-area a.link-right {
+    float: right;
+    font-size: 1.3em;
+}
+
+.kc-login-register.reset .form-area p.instruction {
+    font-size: 1.3em;
+    line-height: 1.3em;
+    margin-bottom: 1.81818181818182em;
+}
+ol#kc-totp-settings {
+    list-style: decimal;
+    padding-left: 2em;
+}
+
+ol#kc-totp-settings li {
+    margin-bottom: 1em;
+    font-size: 1.5em;
+}
+
+ol#kc-totp-settings img {
+    margin: 1em 0;
+}
+
+ol#kc-totp-settings span.code {
+    display: block;
+}
+
+form#kc-totp-settings-form {
+    margin-top: 3em;
+    width: 38.9em;
+}
+
+
+.kc-login-register.email .background-area .section {
+    width: 41.2em;
+}
+.kc-login-register.email .background-area .section.email {
+    width: 45.8em;
+}
+.kc-login-register.email label {
+    width: 6.78571428571429em;
+}
+
+
+.feedback {
+    background-position: left bottom;
+    background-repeat: no-repeat;
+    padding-bottom: 1em;
+
+    position: absolute;
+    top: -7.7em;
+    left: 35em;
+    white-space: nowrap;
+}
+.feedback p {
+    padding: 0.90909090909091em 3.63636363636364em;
+    border-style: solid;
+    border-width: 1px 1px 0px 1px;
+    background-repeat: no-repeat;
+    background-position: 1.27272727272727em center;
+    font-size: 1.1em;
+    line-height: 1.4em;
+    border-radius: 2px;
+    color: #4d5258;
+    margin-bottom: 0;
+}
+
+.feedback.error {
+    background-image: url(../img/feedback-error-arrow-down.png);
+}
+.feedback.error p {
+    border-color: #b91415;
+    background-image: url(../img/feedback-error-sign.png);
+    background-color: #f8e7e7;
+}
+.feedback.success {
+    background-image: url(../img/feedback-success-arrow-down.png);
+}
+.feedback.success p {
+    border-color: #4b9e39;
+    background-image: url(../img/feedback-success-sign.png);
+    background-color: #e4f1e1;
+}
+.feedback.warning {
+    background-image: url(../img/feedback-warning-arrow-down.png);
+}
+.feedback.warning p {
+    border-color: #f17528;
+    background-image: url(../img/feedback-warning-sign.png);
+    background-color: #fef1e9;
+}
 
 .zocial.google {
   background-color: #dd4b39 !important;
 }
 .zocial.google:before {
   content: "+" !important;
-}
\ No newline at end of file
+}
+
+
diff --git a/forms/common-themes/src/main/resources/theme/login/rcue/resources/img/login-bkgrnd.png b/forms/common-themes/src/main/resources/theme/login/rcue/resources/img/login-bkgrnd.png
new file mode 100644
index 0000000..171f6ee
Binary files /dev/null and b/forms/common-themes/src/main/resources/theme/login/rcue/resources/img/login-bkgrnd.png differ
diff --git a/forms/common-themes/src/main/resources/theme/login/rcue/theme.properties b/forms/common-themes/src/main/resources/theme/login/rcue/theme.properties
index 298aa65..400d32b 100644
--- a/forms/common-themes/src/main/resources/theme/login/rcue/theme.properties
+++ b/forms/common-themes/src/main/resources/theme/login/rcue/theme.properties
@@ -1,2 +1,2 @@
 parent=base
-styles=css/styles.css
+styles=css/reset.css lib/zocial/zocial.css css/styles.css
diff --git a/integration/js/pom.xml b/integration/js/pom.xml
new file mode 100755
index 0000000..4eba178
--- /dev/null
+++ b/integration/js/pom.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<project>
+	<parent>
+		<artifactId>keycloak-parent</artifactId>
+		<groupId>org.keycloak</groupId>
+		<version>1.0-alpha-2-SNAPSHOT</version>
+		<relativePath>../pom.xml</relativePath>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+
+	<artifactId>keycloak-js-adapter</artifactId>
+	<name>Keycloak JS Integration</name>
+	<description />
+
+	<dependencies>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>
diff --git a/integration/js/src/main/resources/META-INF/resources/js/keycloak.js b/integration/js/src/main/resources/META-INF/resources/js/keycloak.js
new file mode 100644
index 0000000..47a69fd
--- /dev/null
+++ b/integration/js/src/main/resources/META-INF/resources/js/keycloak.js
@@ -0,0 +1,249 @@
+var Keycloak = function (options) {
+    options = options || {};
+
+    if (!(this instanceof Keycloak)) {
+        return new Keycloak(options);
+    }
+
+    var instance = this;
+
+    if (!options.url) {
+        var scripts = document.getElementsByTagName('script');
+        for (var i = 0; i < scripts.length; i++) {
+            if (scripts[i].src.match(/.*keycloak\.js/)) {
+                options.url = scripts[i].src.substr(0, scripts[i].src.indexOf('/auth/js/keycloak.js'));
+                break;
+            }
+        }
+    }
+
+    if (!options.url) {
+        throw 'url missing';
+    }
+
+    if (!options.realm) {
+        throw 'realm missing';
+    }
+
+    if (!options.clientId) {
+        throw 'clientId missing';
+    }
+
+    if (!options.clientSecret) {
+        throw 'clientSecret missing';
+    }
+
+    this.init = function (successCallback, errorCallback) {
+        if (window.oauth.callback) {
+            delete sessionStorage.oauthToken;
+            processCallback(successCallback, errorCallback);
+        } else if (options.token) {
+            setToken(options.token, successCallback);
+        } else if (sessionStorage.oauthToken) {
+            setToken(sessionStorage.oauthToken, successCallback);
+        } else if (options.onload) {
+            switch (options.onload) {
+                case 'login-required' :
+                    window.location = createLoginUrl(true);
+                    break;
+                case 'check-sso' :
+                    window.location = createLoginUrl(false);
+                    break;
+            }
+        }
+    }
+
+    this.login = function () {
+        window.location.href = createLoginUrl(true);
+    }
+
+    this.logout = function () {
+        setToken(undefined);
+        window.location.href = createLogoutUrl();
+    }
+
+    this.hasRealmRole = function (role) {
+        var access = this.realmAccess;
+        return access && access.roles.indexOf(role) >= 0 || false;
+    }
+
+    this.hasResourceRole = function (role, resource) {
+        if (!this.resourceAccess) {
+            return false;
+        }
+
+        var access = this.resourceAccess[resource || options.clientId];
+        return access && access.roles.indexOf(role) >= 0 || false;
+    }
+
+    this.loadUserProfile = function (success, error) {
+        var url = getRealmUrl() + '/account';
+        var req = new XMLHttpRequest();
+        req.open('GET', url, true);
+        req.setRequestHeader('Accept', 'application/json');
+        req.setRequestHeader('Authorization', 'bearer ' + this.token);
+
+        req.onreadystatechange = function () {
+            if (req.readyState == 4) {
+                if (req.status == 200) {
+                    instance.profile = JSON.parse(req.responseText);
+                    success && success(instance.profile)
+                } else {
+                    var response = { status: req.status, statusText: req.status };
+                    if (req.responseText) {
+                        response.data = JSON.parse(req.responseText);
+                    }
+                    error && error(response);
+                }
+            }
+        }
+
+        req.send();
+    }
+
+    function getRealmUrl() {
+        return options.url + '/auth/rest/realms/' + encodeURIComponent(options.realm);
+    }
+
+    function processCallback(successCallback, errorCallback) {
+        var code = window.oauth.code;
+        var error = window.oauth.error;
+        var prompt = window.oauth.prompt;
+
+        if (code) {
+            var params = 'code=' + code + '&client_id=' + encodeURIComponent(options.clientId) + '&password=' + encodeURIComponent(options.clientSecret);
+            var url = getRealmUrl() + '/tokens/access/codes';
+
+            var req = new XMLHttpRequest();
+            req.open('POST', url, true);
+            req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
+
+            req.onreadystatechange = function () {
+                if (req.readyState == 4) {
+                    if (req.status == 200) {
+                        setToken(JSON.parse(req.responseText)['access_token'], successCallback);
+                    } else {
+                        errorCallback && errorCallback({ authenticated: false, status: req.status, statusText: req.statusText });
+                    }
+                }
+            };
+
+            req.send(params);
+        } else if (error) {
+            if (prompt != 'none') {
+                setTimeout(function() {
+                    errorCallback && errorCallback({  authenticated: false, error: error })
+                }, 0);
+            }
+        }
+    }
+
+    function setToken(token, successCallback) {
+        if (token) {
+            sessionStorage.oauthToken = token;
+            window.oauth.token = token;
+            instance.token = token;
+
+            instance.tokenParsed = JSON.parse(atob(token.split('.')[1]));
+            instance.authenticated = true;
+            instance.username = instance.tokenParsed.sub;
+            instance.realmAccess = instance.tokenParsed.realm_access;
+            instance.resourceAccess = instance.tokenParsed.resource_access;
+
+            setTimeout(function() {
+                successCallback && successCallback({ authenticated: instance.authenticated, username: instance.username });
+            }, 0);
+        } else {
+            delete sessionStorage.oauthToken;
+            delete window.oauth.token;
+            delete instance.token;
+        }
+    }
+
+    function createLoginUrl(prompt) {
+        var state = createUUID();
+
+        sessionStorage.oauthState = state;
+        var url = getRealmUrl()
+            + '/tokens/login'
+            + '?client_id=' + encodeURIComponent(options.clientId)
+            + '&redirect_uri=' + getEncodedRedirectUri()
+            + '&state=' + encodeURIComponent(state)
+            + '&response_type=code';
+
+        if (prompt == false) {
+            url += '&prompt=none';
+        }
+
+        return url;
+    }
+
+    function createLogoutUrl() {
+        var url = getRealmUrl()
+            + '/tokens/logout'
+            + '?redirect_uri=' + getEncodedRedirectUri();
+        return url;
+    }
+
+    function getEncodedRedirectUri() {
+        var url = (location.protocol + '//' + location.hostname + (location.port && (':' + location.port)) + location.pathname);
+        if (location.hash) {
+            url += '?redirect_fragment=' + encodeURIComponent(location.hash.substring(1));
+        }
+        return encodeURI(url);
+    }
+
+    function createUUID() {
+        var s = [];
+        var hexDigits = '0123456789abcdef';
+        for (var i = 0; i < 36; i++) {
+            s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
+        }
+        s[14] = '4';
+        s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);
+        s[8] = s[13] = s[18] = s[23] = '-';
+        var uuid = s.join('');
+        return uuid;
+    }
+}
+
+window.oauth = (function () {
+    var oauth = {};
+
+    var params = window.location.search.substring(1).split('&');
+    for (var i = 0; i < params.length; i++) {
+        var p = params[i].split('=');
+        switch (decodeURIComponent(p[0])) {
+            case 'code':
+                oauth.code = p[1];
+                break;
+            case 'error':
+                oauth.error = p[1];
+                break;
+            case 'state':
+                oauth.state = decodeURIComponent(p[1]);
+                break;
+            case 'redirect_fragment':
+                oauth.fragment = decodeURIComponent(p[1]);
+                break;
+            case 'prompt':
+                oauth.prompt = p[1];
+                break;
+        }
+    }
+
+    if (oauth.state && oauth.state == sessionStorage.oauthState) {
+        oauth.callback = true;
+        delete sessionStorage.oauthState;
+    } else {
+        oauth.callback = false;
+    }
+
+    if (oauth.callback) {
+        window.history.replaceState({}, null, location.protocol + '//' + location.host + location.pathname + (oauth.fragment ? '#' + oauth.fragment : ''));
+    } else if (oauth.fragment) {
+        window.history.replaceState({}, null, location.protocol + '//' + location.host + location.pathname + (oauth.fragment ? '#' + oauth.fragment : ''));
+    }
+
+    return oauth;
+}());
\ No newline at end of file
diff --git a/integration/pom.xml b/integration/pom.xml
index ea39849..8a81e9d 100755
--- a/integration/pom.xml
+++ b/integration/pom.xml
@@ -22,6 +22,7 @@
         <module>undertow</module>
         <module>wildfly-subsystem</module>
         <module>as7-eap-subsystem</module>
+        <module>js</module>
         <!-- <module>as7-eap6/jboss-modules</module> -->
     </modules>
 </project>

misc/logo/login-bg.svg 318(+318 -0)

diff --git a/misc/logo/login-bg.svg b/misc/logo/login-bg.svg
new file mode 100644
index 0000000..f710b1b
--- /dev/null
+++ b/misc/logo/login-bg.svg
@@ -0,0 +1,318 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 width="1440px" height="960px" viewBox="0 0 1440 960" enable-background="new 0 0 1440 960" xml:space="preserve">
+<rect fill="#034672" width="1440" height="961.062"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="633.4873" y1="155.333" x2="696.1514" y2="155.333" gradientTransform="matrix(1 0 0 1 -106 -219.5)">
+	<stop  offset="0" style="stop-color:#FEFEFE"/>
+	<stop  offset="0.1452" style="stop-color:#F4F5F4"/>
+	<stop  offset="0.6844" style="stop-color:#DADCDB"/>
+	<stop  offset="1" style="stop-color:#CFD1D1"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M590.151-76.359c-7.205,5-14.688,3.682-23.184-3.358c-4.896-4.059-11.15-2.771-15.41-1.454
+	c-2.648,0.82-6.324,0.744-9.519,0.075c-13.978-2.93-10.929,6.038-8.339,14.015c4.757,14.64-3.236,18.031-5.983,12.815
+	c-1.766,6.615,7.138,8.572,10.937,7.701c6.007-1.377,14.052-2.153,19.043-0.627c9.545,2.916,13.125,0.513,11.543-2.57
+	c-0.521-1.012-0.229-2.446,0.582-3.126c2.834-2.374,5.295-0.373,8.008-1.947c2.107-1.226,2.076-3.927-1.19-5.463
+	c-1.731-0.813-1.649-2.881,0.185-3.84c3.729-1.952,8.75-1.036,10-5.138C587.271-70.745,588.522-74.435,590.151-76.359z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="859.5273" y1="475.5811" x2="851.2537" y2="475.5811" gradientTransform="matrix(1 0 0 -1 -300 412)">
+	<stop  offset="0" style="stop-color:#E6E6E6"/>
+	<stop  offset="1" style="stop-color:#B3B4B4"/>
+</linearGradient>
+<path fill="url(#SVGID_2_)" d="M554.198-78.152c0,4.983,0.74,22.798,4.537,30.405l-8.733-0.194v-31.473L554.198-78.152z"/>
+<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="466.3438" y1="-243.916" x2="473.3443" y2="-224.4146" gradientTransform="matrix(1 0 0 -1 88 -301.5)">
+	<stop  offset="0" style="stop-color:#F6F6F6"/>
+	<stop  offset="1" style="stop-color:#B3B4B4"/>
+</linearGradient>
+<path fill="url(#SVGID_3_)" d="M534.571-66.4c-2.762-7.458-6.51-16.625,7.469-13.695c3.193,0.669,6.869,0.745,9.518-0.075
+	c4.262-1.317,9.973-2.444,14.514,1.521c8.875,7.748,16.875,8.292,24.08,3.292c-1.629,1.924-3.105,5.563-3.33,7.083
+	c-0.188,1.293-1.133,1.873-2.381,2.379c-18.52,7.52-15.395-5.307-21.353-9.48c-3.158-2.214-7.733-2.09-11.247-0.812
+	c-3.171,1.153-6.438,0.864-9.833-0.396C536.341-78.692,532.532-77.58,534.571-66.4z"/>
+<g opacity="0.75">
+	<path fill="#FFFFFF" d="M558.897-80.461c2.719,0,4.941,0.747,6.795,2.284c5.541,4.592,10.631,6.823,15.558,6.823
+		c1.474,0,2.935-0.207,4.373-0.615c-0.317,0.854-0.56,1.602-0.714,2.111c-0.432,1.414-1.598,1.811-4.357,2.437
+		c-1.463,0.332-3.121,0.708-4.656,1.513c-1.576,0.824-2.535,2.322-2.502,3.908c0.031,1.51,0.928,2.822,2.396,3.514
+		c1.153,0.541,1.478,1.135,1.487,1.373c0.012,0.26-0.344,0.487-0.45,0.551c-0.597,0.347-1.181,0.412-2.052,0.412
+		c-0.16,0-0.32-0.002-0.481-0.004c-0.179-0.002-0.356-0.004-0.535-0.004c-1.632,0-3.394,0.211-5.219,1.74
+		c-1.545,1.294-2.019,3.742-1.078,5.573c0.138,0.267,0.142,0.405,0.149,0.407c-0.094,0.127-0.771,0.566-2.586,0.566
+		c-1.776,0-4.107-0.426-6.742-1.229c-2.004-0.613-4.512-0.924-7.45-0.924c-3.827,0-8.429,0.553-12.624,1.515
+		c-0.412,0.094-0.934,0.144-1.51,0.144c-1.875,0-4.187-0.543-5.672-1.594c1.674-0.011,3.264-0.886,4.365-2.404
+		c1.342-1.844,3.15-6.289,0.213-15.33l-0.08-0.25c-1.278-3.936-2.871-8.833-1.541-10.663c0.508-0.699,1.636-1.053,3.354-1.053
+		c1.188,0,2.632,0.177,4.295,0.525c1.76,0.369,3.618,0.563,5.375,0.563c1.944,0,3.676-0.231,5.145-0.686
+		C553.815-79.776,556.327-80.461,558.897-80.461 M558.897-82.461c-2.662,0-5.242,0.641-7.34,1.29
+		c-1.324,0.41-2.904,0.596-4.553,0.596s-3.367-0.187-4.965-0.521c-1.854-0.389-3.409-0.568-4.704-0.568
+		c-8.474,0-5.881,7.664-3.635,14.583c3.376,10.394,0.327,15.117-2.708,15.117c-1.241,0-2.479-0.789-3.276-2.302
+		c-1.506,5.643,4.751,7.896,8.979,7.896c0.729,0,1.397-0.067,1.957-0.194c3.684-0.844,8.134-1.463,12.177-1.463
+		c2.549,0,4.937,0.246,6.866,0.836c3.037,0.93,5.472,1.318,7.326,1.318c3.975,0,5.295-1.785,4.215-3.888
+		c-0.52-1.013-0.229-2.446,0.584-3.126c1.375-1.152,2.662-1.274,3.935-1.274c0.34,0,0.679,0.009,1.019,0.009
+		c1.004,0,2.011-0.076,3.055-0.682c2.107-1.227,2.076-3.927-1.19-5.463c-1.731-0.814-1.649-2.881,0.185-3.84
+		c3.729-1.952,8.75-1.036,10-5.139c0.447-1.471,1.699-5.16,3.33-7.083c-2.906,2.017-5.857,3.005-8.902,3.005
+		c-4.504,0-9.211-2.163-14.28-6.364C564.481-81.778,561.646-82.461,558.897-82.461L558.897-82.461z M590.151-76.359h0.004H590.151z"
+		/>
+</g>
+<line fill="none" stroke="#FFFFFF" stroke-width="3.5" stroke-miterlimit="10" x1="551.841" y1="-47.636" x2="551.841" y2="-78.859"/>
+<path fill="none" stroke="#034672" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
+	M590.151-76.359c-7.205,5-14.688,3.682-23.184-3.358c-4.896-4.059-11.15-2.771-15.41-1.454c-2.648,0.82-6.324,0.744-9.519,0.075
+	c-13.978-2.93-10.929,6.038-8.339,14.015c4.757,14.64-3.236,18.031-5.983,12.815c-1.766,6.615,7.138,8.572,10.937,7.701
+	c6.007-1.377,14.052-2.153,19.043-0.627c9.545,2.916,13.125,0.513,11.543-2.57c-0.521-1.012-0.229-2.446,0.582-3.126
+	c2.834-2.374,5.295-0.373,8.008-1.947c2.107-1.226,2.076-3.927-1.19-5.463c-1.731-0.813-1.649-2.881,0.185-3.84
+	c3.729-1.952,8.75-1.036,10-5.138C587.271-70.745,588.522-74.435,590.151-76.359z"/>
+<path fill="#034672" d="M534.571-67.4c-2.762-7.458-6.51-16.625,7.469-13.695c3.193,0.669,6.869,0.745,9.518-0.075
+	c4.262-1.317,9.973-2.444,14.514,1.521c8.875,7.748,16.875,8.292,24.08,3.292c-1.629,1.924-3.105,5.563-3.33,7.083
+	c-0.188,1.293-1.115,1.916-2.381,2.379c-13.119,4.795-14.125-5.486-20.082-9.665c-3.158-2.214-9.004-1.908-12.518-0.63
+	c-3.171,1.153-6.438,0.864-9.833-0.396C536.341-79.692,532.532-78.58,534.571-67.4z"/>
+<path fill="#FFFFFF" d="M556.821-102.044c-1.051-0.594-4.273-2.612-5.078-3.064c-0.807-0.453-2.723-1.881-4.819-1.881
+	c-2.096,0-4.014,1.428-4.819,1.881c-0.805,0.452-4.026,2.471-5.078,3.064c-0.806,0.454-3.725,2.037-3.725,6.34
+	c0,1.309,0,3.564,0,4.521c0,2.843,1.598,4.979,4.479,6.44c0.983,0.499,1.763,1.329,1.763,3.468c0,0.943,0.353,1.161,0.918,1.161
+	h0.681c0.625,0,0.965,0.235,0.965,1.256c0,0.562,0,2.062,0,2.062v37.2l2.713,2.779h1.244l5.682-5.819v-34.16c0,0,0-1.5,0-2.062
+	c0-1.021,0.34-1.256,0.965-1.256h0.68c0.566,0,0.918-0.218,0.918-1.161c0-2.139,0.778-2.969,1.762-3.468
+	c2.883-1.462,4.479-3.598,4.479-6.44c0-0.956,0-3.212,0-4.521C560.546-100.007,557.627-101.59,556.821-102.044z"/>
+<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="643.3027" y1="149.5488" x2="674.1378" y2="141.8818" gradientTransform="matrix(1 0 0 1 -106 -219.5)">
+	<stop  offset="0" style="stop-color:#B8D7E8"/>
+	<stop  offset="0.3324" style="stop-color:#CCE3F1"/>
+	<stop  offset="0.6937" style="stop-color:#DAEBF8"/>
+	<stop  offset="1" style="stop-color:#E0EEF9"/>
+</linearGradient>
+<path fill="url(#SVGID_4_)" d="M556.821-102.044c-1.051-0.594-4.273-2.612-5.078-3.064c-0.807-0.453-2.723-1.881-4.819-1.881v69.29
+	l4.819-4.936v-34.16c0,0,0-1.5,0-2.062c0-1.021,0.34-1.256,0.965-1.256h0.68c0.566,0,0.918-0.218,0.918-1.161
+	c0-2.139,0.778-2.969,1.762-3.468c2.883-1.462,4.479-3.598,4.479-6.44c0-0.956,0-3.212,0-4.521
+	C560.546-100.007,557.627-101.59,556.821-102.044z"/>
+<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="646.2637" y1="125.3784" x2="654.8886" y2="167.6281" gradientTransform="matrix(1 0 0 1 -106 -219.5)">
+	<stop  offset="0" style="stop-color:#F1F9FE"/>
+	<stop  offset="0.4254" style="stop-color:#E9F5FD"/>
+	<stop  offset="1" style="stop-color:#E4F3FC"/>
+</linearGradient>
+<path fill="url(#SVGID_5_)" d="M546.924-106.989c-2.097,0-4.014,1.428-4.819,1.881c-0.805,0.452-4.026,2.471-5.078,3.064
+	c-0.806,0.454-3.725,2.037-3.725,6.34c0,1.309,0,3.564,0,4.521c0,2.843,1.598,4.979,4.479,6.44c0.983,0.499,1.763,1.329,1.763,3.468
+	c0,0.943,0.353,1.161,0.918,1.161h0.681c0.625,0,0.965,0.235,0.965,1.256c0,0.562,0,2.062,0,2.062v37.2l2.713,2.779h1.244
+	l0.861-0.883L546.924-106.989L546.924-106.989z"/>
+<path fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" d="M546.634-106.989
+	c1.908,0.938,3.432,1.966,4.236,2.419c0.805,0.452,4.027,2.471,5.078,3.064c0.806,0.454,3.725,2.037,3.725,6.34
+	c0,1.309,0,2.806,0,3.762c0,2.843-1.597,4.979-4.479,6.44c-0.983,0.499-1.762,1.431-1.762,3.569v1.238"/>
+<path fill="none" stroke="#034672" stroke-width="2" stroke-miterlimit="10" d="M556.821-102.044
+	c-1.051-0.594-4.273-2.612-5.078-3.064c-0.807-0.453-2.723-1.881-4.819-1.881c-2.096,0-4.014,1.428-4.819,1.881
+	c-0.805,0.452-4.026,2.471-5.078,3.064c-0.806,0.454-3.725,2.037-3.725,6.34c0,1.309,0,3.564,0,4.521
+	c0,2.843,1.598,4.979,4.479,6.44c0.983,0.499,1.763,1.329,1.763,3.468c0,0.943,0.353,1.161,0.918,1.161h0.681
+	c0.625,0,0.965,0.235,0.965,1.256c0,0.562,0,2.062,0,2.062v37.2l2.713,2.779h1.244l5.682-5.819v-34.16c0,0,0-1.5,0-2.062
+	c0-1.021,0.34-1.256,0.965-1.256h0.68c0.566,0,0.918-0.218,0.918-1.161c0-2.139,0.778-2.969,1.762-3.468
+	c2.883-1.462,4.479-3.598,4.479-6.44c0-0.956,0-3.212,0-4.521C560.546-100.007,557.627-101.59,556.821-102.044z"/>
+<path fill="#E9F6FE" stroke="#034672" stroke-width="2" stroke-miterlimit="10" d="M561.743-76.796"/>
+<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="750.8477" y1="124.7031" x2="750.8477" y2="180.0502" gradientTransform="matrix(1 0 0 1 -106 -219.5)">
+	<stop  offset="0" style="stop-color:#055F94"/>
+	<stop  offset="0.5912" style="stop-color:#004A77"/>
+	<stop  offset="1" style="stop-color:#054167"/>
+</linearGradient>
+<path fill="url(#SVGID_6_)" d="M650.877-61.883h-11.599c0.303,2.346,1.01,3.92,2.117,4.725c1.106,0.805,2.942,1.205,5.506,1.205
+	c3.432,0,7.43-0.238,11.99-0.717l0.911,5.994c-3.346,1.607-8.015,2.411-14.01,2.411c-6.038,0-10.339-1.304-12.901-3.909
+	c-2.562-2.607-3.845-6.907-3.845-12.902c0-6.299,1.248-10.707,3.746-13.228c2.498-2.519,6.701-3.779,12.608-3.779
+	c5.345,0,9.209,0.923,11.6,2.769c2.389,1.848,3.605,4.66,3.648,8.439c0,2.997-0.771,5.245-2.312,6.744
+	C656.796-62.633,654.308-61.883,650.877-61.883z M639.083-67.683h9.122c1.173,0,1.966-0.282,2.378-0.847
+	c0.413-0.564,0.619-1.393,0.619-2.479c0-1.52-0.391-2.574-1.172-3.16c-0.782-0.586-2.217-0.88-4.301-0.88
+	c-2.478,0-4.172,0.489-5.084,1.466C639.733-72.602,639.213-70.637,639.083-67.683z"/>
+<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="784.4727" y1="124.7031" x2="784.4727" y2="180.0486" gradientTransform="matrix(1 0 0 1 -106 -219.5)">
+	<stop  offset="0" style="stop-color:#055F94"/>
+	<stop  offset="0.5912" style="stop-color:#004A77"/>
+	<stop  offset="1" style="stop-color:#054167"/>
+</linearGradient>
+<path fill="url(#SVGID_7_)" d="M696.294-81.171L684.892-48.59c-0.609,1.736-1.359,3.344-2.248,4.82
+	c-0.892,1.478-2.031,2.898-3.422,4.27c-1.391,1.368-3.117,2.378-5.18,3.029c-2.064,0.652-4.355,0.824-6.875,0.521l-0.781-5.671
+	c2.605-0.694,4.646-1.597,6.125-2.702c1.477-1.107,2.627-2.598,3.453-4.465l0.131-0.262h-1.824c-1.607,0-2.649-0.781-3.129-2.348
+	l-10.49-29.776h10.295l5.996,20.786c0.391,1.521,0.717,3.128,0.978,4.82h0.847c0.131-0.521,0.348-1.336,0.651-2.441
+	s0.521-1.898,0.651-2.379L686-81.173L696.294-81.171L696.294-81.171z"/>
+<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="815.5596" y1="124.7031" x2="815.5596" y2="180.0502" gradientTransform="matrix(1 0 0 1 -106 -219.5)">
+	<stop  offset="0" style="stop-color:#055F94"/>
+	<stop  offset="0.5912" style="stop-color:#004A77"/>
+	<stop  offset="1" style="stop-color:#054167"/>
+</linearGradient>
+<path fill="url(#SVGID_8_)" d="M722.98-56.67l0.85,6.256c-3.305,1.434-7.451,2.149-12.446,2.149c-5.907,0-10.065-1.271-12.479-3.812
+	c-2.412-2.541-3.615-6.896-3.615-13.063c0-6.214,1.216-10.59,3.646-13.131c2.436-2.541,6.625-3.812,12.576-3.812
+	c4.865,0,8.818,0.674,11.859,2.021l-1.042,5.994c-4.692-0.086-7.755-0.131-9.188-0.131c-2.953,0-4.984,0.631-6.092,1.891
+	c-1.107,1.26-1.662,3.648-1.662,7.168c0,3.518,0.555,5.907,1.662,7.167c1.107,1.261,3.139,1.89,6.092,1.89
+	C716.92-56.084,720.199-56.279,722.98-56.67z"/>
+<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="866.3086" y1="124.7031" x2="866.3086" y2="180.0509" gradientTransform="matrix(1 0 0 1 -106 -219.5)">
+	<stop  offset="0" style="stop-color:#055F94"/>
+	<stop  offset="0.5912" style="stop-color:#004A77"/>
+	<stop  offset="1" style="stop-color:#054167"/>
+</linearGradient>
+<path fill="url(#SVGID_9_)" d="M760.341-82.083c5.996,0,10.241,1.293,12.74,3.877c2.497,2.585,3.746,6.962,3.746,13.13
+	c0,6.17-1.249,10.523-3.746,13.064c-2.499,2.542-6.744,3.812-12.74,3.812c-6.038,0-10.308-1.271-12.804-3.812
+	c-2.499-2.541-3.747-6.896-3.747-13.064c0-6.211,1.248-10.599,3.747-13.162C750.033-80.801,754.303-82.083,760.341-82.083z
+	 M760.341-74.85c-2.562,0-4.278,0.65-5.146,1.954c-0.871,1.304-1.305,3.91-1.305,7.82c0,3.822,0.434,6.385,1.305,7.688
+	c0.867,1.303,2.584,1.955,5.146,1.955c2.478,0,4.16-0.652,5.052-1.955c0.889-1.304,1.336-3.866,1.336-7.688
+	c0-3.865-0.437-6.462-1.305-7.788C764.555-74.188,762.859-74.85,760.341-74.85z"/>
+<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="900.2178" y1="124.7031" x2="900.2178" y2="180.0502" gradientTransform="matrix(1 0 0 1 -106 -219.5)">
+	<stop  offset="0" style="stop-color:#055F94"/>
+	<stop  offset="0.5912" style="stop-color:#004A77"/>
+	<stop  offset="1" style="stop-color:#054167"/>
+</linearGradient>
+<path fill="url(#SVGID_10_)" d="M781.22-74.003l-0.911-6.517c5.776-1.043,11.358-1.563,16.745-1.563c4.345,0,7.537,0.88,9.578,2.64
+	c2.043,1.759,3.063,4.811,3.063,9.154v21.242h-7.625l-0.978-4.887c-3.217,3.779-7.168,5.669-11.858,5.669
+	c-3.086,0-5.604-0.814-7.56-2.443s-2.935-3.897-2.935-6.81v-3.258c0-2.562,0.869-4.562,2.607-5.994
+	c1.735-1.436,4.147-2.15,7.231-2.15h11.469v-1.434c-0.045-1.65-0.424-2.759-1.142-3.324c-0.717-0.563-2.096-0.847-4.139-0.847
+	C791.21-74.525,786.693-74.35,781.22-74.003z M788.257-60.059v1.238c0,2.215,1.261,3.32,3.779,3.32c2.606,0,5.278-1.042,8.016-3.127
+	v-4.496h-8.666C789.3-63.078,788.257-62.057,788.257-60.059z"/>
+<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="721.2734" y1="124.7031" x2="721.2734" y2="180.0485" gradientTransform="matrix(1 0 0 1 -106 -219.5)">
+	<stop  offset="0" style="stop-color:#055F94"/>
+	<stop  offset="0.5912" style="stop-color:#004A77"/>
+	<stop  offset="1" style="stop-color:#054167"/>
+</linearGradient>
+<path fill="url(#SVGID_11_)" d="M621.856-63.382c-0.914-1.563-1.912-2.714-2.998-3.454v-0.13c1.304-0.868,2.303-1.89,2.998-3.062
+	l8.34-11.145H619.38l-7.95,11.208h-2.997c0.303-1.781,0.455-3.736,0.455-5.865v-18.83h-2.992l-6.65,9.482v36.13h9.644v-10.1
+	c0-1.26-0.151-2.867-0.454-4.822h3.062l8.991,14.922h10.815L621.856-63.382z"/>
+<linearGradient id="SVGID_12_" gradientUnits="userSpaceOnUse" x1="840.6543" y1="124.7031" x2="840.6543" y2="180.0498" gradientTransform="matrix(1 0 0 1 -106 -219.5)">
+	<stop  offset="0" style="stop-color:#055F94"/>
+	<stop  offset="0.5912" style="stop-color:#004A77"/>
+	<stop  offset="1" style="stop-color:#054167"/>
+</linearGradient>
+<path fill="url(#SVGID_12_)" d="M742.016-56.279h-2.607c-2.434,0-3.646-1.086-3.646-3.258v-35.122h-3.014l-6.564,9.36v28.172
+	c0,2.824,0.824,5.008,2.477,6.549c1.65,1.542,3.91,2.313,6.777,2.313c3.475,0,6.035-0.435,7.688-1.304L742.016-56.279z"/>
+<linearGradient id="SVGID_13_" gradientUnits="userSpaceOnUse" x1="935.4414" y1="124.7031" x2="935.4414" y2="180.0485" gradientTransform="matrix(1 0 0 1 -106 -219.5)">
+	<stop  offset="0" style="stop-color:#055F94"/>
+	<stop  offset="0.5912" style="stop-color:#004A77"/>
+	<stop  offset="1" style="stop-color:#054167"/>
+</linearGradient>
+<path fill="url(#SVGID_13_)" d="M836.021-63.382c-0.91-1.563-1.91-2.714-2.998-3.454v-0.13c1.305-0.868,2.305-1.89,2.998-3.062
+	l8.342-11.145h-10.816l-7.949,11.208H822.6c0.303-1.781,0.456-3.736,0.456-5.865v-18.83h-2.991l-6.651,9.484v36.128h9.646v-10.1
+	c0-1.26-0.154-2.867-0.457-4.822h3.062l8.992,14.922h10.814L836.021-63.382z"/>
+<linearGradient id="SVGID_14_" gradientUnits="userSpaceOnUse" x1="652.9258" y1="120.5371" x2="652.9258" y2="130.705" gradientTransform="matrix(1 0 0 1 -106 -219.5)">
+	<stop  offset="0" style="stop-color:#01649B"/>
+	<stop  offset="0.2355" style="stop-color:#03588B"/>
+	<stop  offset="0.507" style="stop-color:#004E7C"/>
+	<stop  offset="0.7167" style="stop-color:#004873"/>
+	<stop  offset="1" style="stop-color:#00446E"/>
+</linearGradient>
+<polygon fill="url(#SVGID_14_)" points="546.926,-97.068 537.874,-99.093 536.874,-95.354 546.926,-90.296 556.978,-95.354 
+	555.978,-99.093 "/>
+<polyline opacity="0.2" fill="#010202" enable-background="new    " points="546.926,-90.296 556.978,-95.354 555.978,-99.093 
+	546.926,-97.068 "/>
+<path fill="#034672" d="M542.008-77.588c3.396,1.261,6.662,1.55,9.833,0.396l-0.283-2.223c-2.647,0.82-6.324,0.744-9.518,0.075
+	L542.008-77.588z"/>
+<path fill="#034672" d="M546.653-77.941c-0.403,2.757,1.896,4.707,1.896,7.619C552.397-74.657,547.476-76.119,546.653-77.941z"/>
+<path fill="#034672" d="M546.606-77.754c-0.119,3.207-0.402,5.581-1.742,7.247C542.446-75.244,545.552-76.827,546.606-77.754z"/>
+<circle fill="#034672" cx="546.634" cy="-77.776" r="1.594"/>
+<linearGradient id="SVGID_15_" gradientUnits="userSpaceOnUse" x1="663.6963" y1="172.3086" x2="663.6963" y2="172.3086" gradientTransform="matrix(1 0 0 1 -106 -219.5)">
+	<stop  offset="0" style="stop-color:#F6F6F6"/>
+	<stop  offset="0.5386" style="stop-color:#E4E4E3"/>
+	<stop  offset="1" style="stop-color:#DADADA"/>
+</linearGradient>
+<path fill="url(#SVGID_15_)" d="M557.696-47.191"/>
+<defs>
+	<filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="545.96" y="-353.609" width="906.85" height="793.638">
+		<feColorMatrix  type="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 1 0"/>
+	</filter>
+</defs>
+<mask maskUnits="userSpaceOnUse" x="545.96" y="-353.609" width="906.85" height="793.638" id="SVGID_16_">
+	<g filter="url(#Adobe_OpacityMaskFilter)">
+		<polygon fill="#FFFFFF" points="1452.81,-170.972 636.18,-353.609 545.96,-16.261 1452.81,440.028 		"/>
+	</g>
+</mask>
+<linearGradient id="SVGID_17_" gradientUnits="userSpaceOnUse" x1="624.2432" y1="-457.793" x2="1695.7627" y2="582.4073">
+	<stop  offset="0" style="stop-color:#FFFFFF"/>
+	<stop  offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<polygon opacity="0.04" mask="url(#SVGID_16_)" fill="url(#SVGID_17_)" points="1452.81,-170.972 636.18,-353.609 545.96,-16.261 
+	1452.81,440.028 "/>
+<defs>
+	<filter id="Adobe_OpacityMaskFilter_1_" filterUnits="userSpaceOnUse" x="-148.385" y="185.369" width="942.603" height="465.304">
+		<feColorMatrix  type="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 1 0"/>
+	</filter>
+</defs>
+<mask maskUnits="userSpaceOnUse" x="-148.385" y="185.369" width="942.603" height="465.304" id="SVGID_18_">
+	<g filter="url(#Adobe_OpacityMaskFilter_1_)">
+		<linearGradient id="SVGID_19_" gradientUnits="userSpaceOnUse" x1="-10.3784" y1="93.8052" x2="353.6215" y2="493.8049">
+			<stop  offset="0" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#000000"/>
+		</linearGradient>
+		<path fill="url(#SVGID_19_)" d="M-142.385,456.954c241.188-37.587,535.834,12.111,710.251,193.719L737.183,407.09
+			c-240.655-239.438-582.089-236.892-847.54-208.783L-142.385,456.954z"/>
+	</g>
+</mask>
+<path opacity="0.1" mask="url(#SVGID_18_)" fill="#010202" d="M-148.385,456.954c241.188-37.587,535.834,12.111,710.251,193.719
+	l232.352-172.074c-21.068-27.212-43.2-52.042-66.242-74.679C487.503,167.675,147.918,170.322-116.357,198.307L-148.385,456.954z"/>
+<defs>
+	<filter id="Adobe_OpacityMaskFilter_2_" filterUnits="userSpaceOnUse" x="-50.702" y="-58.489" width="287.402" height="1042.099">
+		<feColorMatrix  type="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 1 0"/>
+	</filter>
+</defs>
+<mask maskUnits="userSpaceOnUse" x="-50.702" y="-58.489" width="287.402" height="1042.099" id="SVGID_20_">
+	<g filter="url(#Adobe_OpacityMaskFilter_2_)">
+		<linearGradient id="SVGID_21_" gradientUnits="userSpaceOnUse" x1="150.8232" y1="980.0547" x2="44.8237" y2="580.0556">
+			<stop  offset="0" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#000000"/>
+		</linearGradient>
+		<path opacity="0.1" fill="url(#SVGID_21_)" d="M87.395-16.937c0,163.962,24.356,750.233,149.306,1000.547l-287.402-6.396V-58.489
+			L87.395-16.937z"/>
+	</g>
+</mask>
+<path mask="url(#SVGID_20_)" fill="#010202" d="M87.395-16.937c0,163.962,24.356,750.233,149.306,1000.547l-287.402-6.396V-58.489
+	L87.395-16.937z"/>
+<defs>
+	
+		<filter id="Adobe_OpacityMaskFilter_3_" filterUnits="userSpaceOnUse" x="-72.785" y="-491.193" width="1622.238" height="1285.796">
+		<feFlood  style="flood-color:white;flood-opacity:1" result="back"/>
+		<feBlend  in="SourceGraphic" in2="back" mode="normal"/>
+	</filter>
+</defs>
+<mask maskUnits="userSpaceOnUse" x="-72.785" y="-491.193" width="1622.238" height="1285.796" id="SVGID_22_">
+	<g filter="url(#Adobe_OpacityMaskFilter_3_)">
+		<defs>
+			
+				<filter id="Adobe_OpacityMaskFilter_4_" filterUnits="userSpaceOnUse" x="-72.785" y="-491.193" width="1622.238" height="1285.089">
+				<feFlood  style="flood-color:white;flood-opacity:1" result="back"/>
+				<feBlend  in="SourceGraphic" in2="back" mode="normal"/>
+			</filter>
+		</defs>
+		<mask maskUnits="userSpaceOnUse" x="-72.785" y="-491.193" width="1622.238" height="1285.089" id="SVGID_22_">
+			<g filter="url(#Adobe_OpacityMaskFilter_4_)">
+			</g>
+		</mask>
+		<linearGradient id="SVGID_23_" gradientUnits="userSpaceOnUse" x1="814.3154" y1="328.0283" x2="2094.3154" y2="-719.9717">
+			<stop  offset="0" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#000000"/>
+		</linearGradient>
+		<path mask="url(#SVGID_22_)" fill="url(#SVGID_23_)" d="M-72.785,410.758c848.81,35.016,1323.22-295.517,1502.614-901.951
+			c-4.743,181.709,37.787,453.373,93.752,548.953c47.774,81.209,23.788,158.081-26.479,241.24
+			C975.882,1160.862,493.92,627.783-29.659,661.768"/>
+	</g>
+</mask>
+<path opacity="0.02" fill="#FFFFFF" d="M-72.785,410.758c848.81,35.016,1323.22-295.517,1502.614-901.951
+	C1425.086-309.484,1467.616-36.58,1523.581,59c47.774,81.209,23.788,158.081-26.479,241.24
+	C975.882,1162.103,493.92,627.783-29.659,661.768"/>
+<defs>
+	
+		<filter id="Adobe_OpacityMaskFilter_5_" filterUnits="userSpaceOnUse" x="310.575" y="-10.889" width="1160.942" height="1025.949">
+		<feColorMatrix  type="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 1 0"/>
+	</filter>
+</defs>
+<mask maskUnits="userSpaceOnUse" x="310.575" y="-10.889" width="1160.942" height="1025.949" id="SVGID_24_">
+	<g filter="url(#Adobe_OpacityMaskFilter_5_)">
+		<linearGradient id="SVGID_25_" gradientUnits="userSpaceOnUse" x1="679.0371" y1="906.7842" x2="1525.0364" y2="270.7838">
+			<stop  offset="0" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#000000"/>
+		</linearGradient>
+		<path opacity="0.06" fill="url(#SVGID_25_)" d="M1453.518,979.062l18-989.951h-442.43L310.575,1015.06L1453.518,979.062z"/>
+	</g>
+</mask>
+<path mask="url(#SVGID_24_)" fill="#010202" d="M1453.518,979.062l18-989.951h-442.43L310.575,1015.06L1453.518,979.062z"/>
+<defs>
+	<filter id="Adobe_OpacityMaskFilter_6_" filterUnits="userSpaceOnUse" x="-90.392" y="-409.996" width="841.456" height="736.356">
+		<feColorMatrix  type="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 1 0"/>
+	</filter>
+</defs>
+<mask maskUnits="userSpaceOnUse" x="-90.392" y="-409.996" width="841.456" height="736.356" id="SVGID_26_">
+	<g filter="url(#Adobe_OpacityMaskFilter_6_)">
+		<linearGradient id="SVGID_27_" gradientUnits="userSpaceOnUse" x1="258.9375" y1="-348.3218" x2="418.9364" y2="467.6746">
+			<stop  offset="0" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#000000"/>
+		</linearGradient>
+		<path fill="url(#SVGID_27_)" d="M746.367-163.7c-72.229,10.651-98.964,78.571-50.732,125.772
+			c90.98,89.101,60.661,179.447-23.771,195.806c-108.654,20.943-167.397-74.289-289.375-28.11
+			c-34.924,13.221-61.272,57.631-55.681,97.377C343.71,348.214,196.545,386.71-87.566,178.743
+			c-28.532-20.897,168.378-588.739,168.378-588.739L746.367-163.7z"/>
+	</g>
+</mask>
+<path opacity="0.1" mask="url(#SVGID_26_)" d="M746.367-163.7c-72.229,10.651-98.964,78.571-50.732,125.772
+	c90.98,89.101,60.661,179.447-23.771,195.806c-108.654,20.943-167.397-74.289-289.375-28.11
+	c-34.924,13.221-61.272,57.631-55.681,97.377C343.71,348.214,196.545,386.71-87.566,178.743
+	c-28.532-20.897,168.378-588.739,168.378-588.739L746.367-163.7z"/>
+</svg>
diff --git a/misc/logo/login-bkgrnd.svg b/misc/logo/login-bkgrnd.svg
new file mode 100644
index 0000000..1e187a6
--- /dev/null
+++ b/misc/logo/login-bkgrnd.svg
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="1440"
+   height="960"
+   id="svg3601"
+   version="1.1"
+   inkscape:version="0.48.4 r9939"
+   inkscape:export-filename="/home/st/dev/keycloak/forms/common-themes/src/main/resources/theme/login/keycloak/resources/img/login-bg.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   sodipodi:docname="New document 4">
+  <defs
+     id="defs3603" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#034672"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="1"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.94583333"
+     inkscape:cx="635.4185"
+     inkscape:cy="500.62295"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="1056"
+     inkscape:window-x="0"
+     inkscape:window-y="24"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata3606">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-92.362183)">
+    <path
+       style="fill:#ffffff;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:0.03921569"
+       d="M -128.98679,354.18502 C 1049.8678,403.87665 1286.696,-338.326 1286.696,-338.326 L 1509.7797,69.77974 C 1021.674,1139.3833 459.55946,577.62114 -97.268722,607.92951 z"
+       id="path4395"
+       inkscape:connector-curvature="0"
+       transform="translate(0,92.362183)"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       sodipodi:nodetypes="cccccc"
+       inkscape:connector-curvature="0"
+       id="path4905"
+       d="M 1483.348,472.8438 C 304.49339,423.15217 67.665192,1165.3548 67.665192,1165.3548 L -143.25992,1150.183 -155.41851,733.24908 C 332.68719,-336.3545 929.6916,248.35041 1486.5198,218.04204 z"
+       style="fill:#ffffff;fill-opacity:0.03921569;stroke:none"
+       inkscape:export-xdpi="90"
+       inkscape:export-ydpi="90" />
+  </g>
+</svg>

server/pom.xml 5(+5 -0)

diff --git a/server/pom.xml b/server/pom.xml
index 5d7dbfe..bd3d7ee 100755
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -114,6 +114,11 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.keycloak</groupId>
+            <artifactId>keycloak-js-adapter</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>4.1</version>
diff --git a/services/src/main/java/org/keycloak/services/resources/flows/OAuthFlows.java b/services/src/main/java/org/keycloak/services/resources/flows/OAuthFlows.java
index a18540f..626aab8 100755
--- a/services/src/main/java/org/keycloak/services/resources/flows/OAuthFlows.java
+++ b/services/src/main/java/org/keycloak/services/resources/flows/OAuthFlows.java
@@ -25,9 +25,11 @@ import org.jboss.resteasy.logging.Logger;
 import org.jboss.resteasy.spi.HttpRequest;
 import org.keycloak.models.Constants;
 import org.keycloak.models.RealmModel;
+import org.keycloak.models.RequiredCredentialModel;
 import org.keycloak.models.RoleModel;
 import org.keycloak.models.UserModel;
 import org.keycloak.models.UserModel.RequiredAction;
+import org.keycloak.representations.idm.CredentialRepresentation;
 import org.keycloak.services.managers.AccessCodeEntry;
 import org.keycloak.services.managers.AuthenticationManager;
 import org.keycloak.services.managers.TokenManager;
@@ -87,6 +89,9 @@ public class OAuthFlows {
     }
 
     public Response processAccessCode(String scopeParam, String state, String redirect, UserModel client, UserModel user) {
+        isTotpConfigurationRequired(user);
+        isEmailVerificationRequired(user);
+
         RoleModel resourceRole = realm.getRole(Constants.APPLICATION_ROLE);
         RoleModel identityRequestRole = realm.getRole(Constants.IDENTITY_REQUESTER_ROLE);
         boolean isResource = realm.hasRole(client, resourceRole);
@@ -126,4 +131,20 @@ public class OAuthFlows {
         return Flows.forms(realm, request, uriInfo).setError(message).createErrorPage();
     }
 
+    private void isTotpConfigurationRequired(UserModel user) {
+        for (RequiredCredentialModel c : realm.getRequiredCredentials()) {
+            if (c.getType().equals(CredentialRepresentation.TOTP) && !user.isTotp()) {
+                user.addRequiredAction(RequiredAction.CONFIGURE_TOTP);
+                log.debug("User is required to configure totp");
+            }
+        }
+    }
+
+    private void isEmailVerificationRequired(UserModel user) {
+        if (realm.isVerifyEmail() && !user.isEmailVerified()) {
+            user.addRequiredAction(RequiredAction.VERIFY_EMAIL);
+            log.debug("User is required to verify email");
+        }
+    }
+
 }
diff --git a/services/src/main/java/org/keycloak/services/resources/SocialResource.java b/services/src/main/java/org/keycloak/services/resources/SocialResource.java
index 4914c8a..b7d3bd7 100755
--- a/services/src/main/java/org/keycloak/services/resources/SocialResource.java
+++ b/services/src/main/java/org/keycloak/services/resources/SocialResource.java
@@ -78,9 +78,6 @@ public class SocialResource {
     private HttpRequest request;
 
     @Context
-    private HttpResponse response;
-
-    @Context
     ResourceContext resourceContext;
 
     @Context
diff --git a/services/src/main/java/org/keycloak/services/resources/TokenService.java b/services/src/main/java/org/keycloak/services/resources/TokenService.java
index 79992d6..3263715 100755
--- a/services/src/main/java/org/keycloak/services/resources/TokenService.java
+++ b/services/src/main/java/org/keycloak/services/resources/TokenService.java
@@ -230,9 +230,6 @@ public class TokenService {
             return Flows.forms(realm, request, uriInfo).setError(Messages.INVALID_USER).setFormData(formData).createLogin();
         }
 
-        isTotpConfigurationRequired(user);
-        isEmailVerificationRequired(user);
-
         AuthenticationStatus status = authManager.authenticateForm(realm, user, formData);
 
         switch (status) {
@@ -255,22 +252,6 @@ public class TokenService {
         return service;
     }
 
-    private void isTotpConfigurationRequired(UserModel user) {
-        for (RequiredCredentialModel c : realm.getRequiredCredentials()) {
-            if (c.getType().equals(CredentialRepresentation.TOTP) && !user.isTotp()) {
-                user.addRequiredAction(RequiredAction.CONFIGURE_TOTP);
-                logger.debug("User is required to configure totp");
-            }
-        }
-    }
-
-    private void isEmailVerificationRequired(UserModel user) {
-        if (realm.isVerifyEmail() && !user.isEmailVerified()) {
-            user.addRequiredAction(RequiredAction.VERIFY_EMAIL);
-            logger.debug("User is required to verify email");
-        }
-    }
-
     @Path("registrations")
     @POST
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
diff --git a/testsuite/integration/pom.xml b/testsuite/integration/pom.xml
index acd2316..115dc5d 100755
--- a/testsuite/integration/pom.xml
+++ b/testsuite/integration/pom.xml
@@ -61,6 +61,11 @@
             <artifactId>keycloak-model-jpa</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.keycloak</groupId>
+            <artifactId>keycloak-js-adapter</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <!--
         <dependency>
             <groupId>org.keycloak</groupId>
diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/KeycloakServer.java b/testsuite/integration/src/main/java/org/keycloak/testutils/KeycloakServer.java
index 60433a2..136a400 100755
--- a/testsuite/integration/src/main/java/org/keycloak/testutils/KeycloakServer.java
+++ b/testsuite/integration/src/main/java/org/keycloak/testutils/KeycloakServer.java
@@ -316,12 +316,12 @@ public class KeycloakServer {
                 return new URLResource(url, url.openConnection(), path);
             } else {
                 File file;
-                if (path.startsWith("/forms/")) {
-                    file = file(resourcesHome, "forms", "src", "main", "resources", "META-INF", "resources", path.replace('/', File.separatorChar));
-                } else if (path.startsWith("/admin/")) {
+                if (path.startsWith("/admin/")) {
                     file = file(resourcesHome, "admin-ui", "src", "main", "resources", "META-INF", "resources", path.replace('/', File.separatorChar));
                 } else if (path.startsWith("/admin-ui/")) {
                     file = file(resourcesHome, "admin-ui-styles", "src", "main", "resources", "META-INF", "resources", path.replace('/', File.separatorChar));
+                } else if (path.startsWith("/js/")) {
+                    file = file(resourcesHome, "integration", "js", "src", "main", "resources", "META-INF", "resources", path.replace('/', File.separatorChar));
                 } else {
                     throw new IOException("Unknown resource " + path);
                 }
diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/pages/ErrorPage.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/pages/ErrorPage.java
index cc06da5..0ca3595 100644
--- a/testsuite/integration/src/test/java/org/keycloak/testsuite/pages/ErrorPage.java
+++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/pages/ErrorPage.java
@@ -34,7 +34,7 @@ public class ErrorPage extends AbstractPage {
     @WebResource
     protected OAuthClient oauth;
 
-    @FindBy(id = "error-summary")
+    @FindBy(className = "instruction")
     private WebElement errorMessage;
 
     public String getError() {